Javascript examples for Array:push
Array push and then show its content
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {// w ww .ja v a2 s.c om var value = []; for (var i = 1; i <= 300; i++) { value.push(i); display(value); } function display(msg) { var p = document.createElement('p'); p.innerHTML = msg; document.body.appendChild(p); } }); </script> </head> <body> </body> </html>