<body>
<div id="demo"></div>
<script>
var x=1;
var y=1;
var sum = x + y;
for(var x=1; x<6; x++){
for(var y=1; y<3; y++){
var sum = x + y;
document.getElementById("demo").innerHTML += "The number x is " + x + "The number y is " + y + "Their sum is " + sum + "<br>";
}
}
</script>
</body>
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.