Reputation: 103
It is supposed to print multiplication table of number 1-10.
<script>
//Multiplication table of 1 to 10;
var a=b=1;
for (a==1; a<=10; a++){
for(b==1; b<=10; b++){
document.write(a + "x" + b + "=" + (a*b) + "<br />");
}
}
</script>
Upvotes: 1
Views: 64
Reputation: 1
there will be only single equal to sign in for loop
//Multiplication table of 1 to 10;
var a=b=1;
for (a=1; a<=10; a++){
for(b=1; b<=10; b++){
document.write(a + "x" + b + "=" + (a*b) + "<br />");
}
}
Upvotes: 0