Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> var list = [1, 2, 3, 4, 5]; var i = 0, length = list.length; for ( i; i < length; i++) {console.log(list[i]);} document.getElementById("demo").innerHTML = list; </script> </body> </html>