Javascript examples for Number Operation:Integer
Multiple of "2"
<html> <head> <script> var n = 10;//from w ww.j a v a2 s .com function start() { var pre = document.getElementById("my-output"); pre.innerHTML = ""; for (var i=1 ; i<=n ; i++) { pre.innerHTML += i + " * 2 = " + (i * 2) + "\n"; } } </script> </head> <body> <pre id="my-output">Click the button to see the resulting table.</pre> <button onclick="start()">Show the table</button> </body> </html>