I have to create a while loop displaying the integers from 1-20 but only 5 integers per line.
I can’t get the 5 integers per line part. What is the best way to do that?
I have to create a while loop displaying the integers from 1-20 but only
Share
Here’s a solution that builds a string and displays an alert box with the result.
jsFiddle to test: http://jsfiddle.net/willslab/KUVkX/3/