Javascript examples for Operator:Arithmetic Operator
Adding looped prompts together to get a sum
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){//from w ww . j a v a 2 s . co m var input = '3'; var min = parseInt(input); while (input !== "0") { input = parseInt(input); if (input < min) { min = input; } input = '2'; } console.log(min); } </script> </head> <body> </body> </html>