编写一个 JavaScript 程序来显示两个整数的和。
源代码
<html>
<head>
<title>Addition of Two Numbers</title>
</head>
<body>
<script type="text/javascript">
let n1, n2, sum; // Or var n1, n2, sum;
n1 = 5;
n2 = 7;
sum = n1 + n2;
document.write("Performing addition of 5 and 7 "+"<br/>");
document.write("Result = " + sum);
</script>
</body>
</html>