i'm very beginner on this programing.... anyone can help me to do this loop problem... how to right code to get the result below * ** *** **** ***** please help and teach me..... thanks....
Looks like your homework to me. So no copy and paste code for you, but this: http://www.w3schools.com/js/js_loop_for.asp
as NicoSwd says dont Copy and paste for homework, but here is the code <script type="text/javascript"> var i=0; var j=0; for (i=0;i<=4;i++) { for (j=0;j<=i;j++){ document.write("*"); } document.write("<br />"); } </script> Code (markup):
*........* **......** ***....*** ****..**** ********** how to doing loop result like this?... "." is nothing just a space....
hey NamUk i have replied to your email message though DP few days back with the code, not sure you got it   is used to make a space <script type="text/javascript"> var i=0; var j=0; for (i=0;i<=4;i++) { for (j=0;j<=i;j++){ document.write("*"); } for (j=0;j<=((4-i)*4)-2;j++){ document.write(" "); } for (j=0;j<=i;j++){ document.write("*"); } document.write("<br />"); } </script> Code (markup):