hi guys im a newb and i've been trying to come up with this output using repetitions but i am having a problem.. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * my code prints this * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * here is my code: <script> var row=8, column; while (row>=1){ column=1; while(column<=8){ document.write( row%2==0 ? "* ": " "); ++column; } --row; document.writeln(" <br/>"); } </script> can u tell me whats wrong with my code? thanks
oh the heck! there should be a space on every multiples of 2 whats wrong with this forum? it wont print as it is?
wrap the code in or [code] tags and you'll have better luck.....also, what do you want it to print ? PHP:
oh boy.. haha! * * * * * * * * _* * * * * * * * * * * * * * * * _* * * * * * * * * * * * * * * * _* * * * * * * * * * * * * * * * _* * * * * * * * ok lets say that the underscore is an invisible(_) space like that im only allowed to use javascript by the way