ibvasi
4/6/2017 - 5:57 AM

Multiplication table

Multiplication table

function multiply(number) {
    var mainNumber = number;
    for (var i = 1; i <= 20; i++) {
        var finalNumber = mainNumber * i;
        console.log(mainNumber + " " + "x" + " " + i + " = " + finalNumber);
    }
}
multiply(5); // Prints multiplication table of 5