I am learning JavaScript and I want to make times table from 2 to 10 and want to display it at the developer console. I could only do the times table of 2. But I could not do it up to 10.
My code is :
var i = 0;
var j = 2;
var product = i*j;
for (i=0; i<=10; i++) {
console.log(j,"*",i,"=",product);
}
I wrote this code and could make it only for the times table of two. What can I add to it to make the times table up to 10 and display it at the developer console? The time table must be displayed vertically.