HTML file / web page with some simple Javascript code:
The Javascript code in the page allows a user to enter two numbers
and then prints the sum of those two numbers:
Shown below is the JavaScript code:
<script>
var num1, num2, sum
num1 = prompt("Enter first number")
num2 = prompt("Enter second number")
sum = parseInt(num1) + parseInt(num2) // "+" means "add"
alert("Sum = " + sum) // "+" means combine into a string
</script>
You are encouraged to view the "source code"
(i.e. use the browser to view the underlying HTML and Javascript) for this page.