Anyone in need to print a multiplication table, you're in the right place!
npm install multitables@latest --save
How to use it:
var your_var = new Multitables(number)
number
is an array with 2 required numbers: [multiply_number, repeat_number]
multiply_number
number: Your multiplication number. For example:
multiply_number x __ = __
repeat_number
number How many times you want your multiplication table to repeat. For example:
multiply_number x repeat_number = __
To get the table, you just need to run your_var.multiplicationTableText
, and you'll get your table!
var my_var = new Multitables([3, 8]) // Should print out the table of 3 uptill 3 x 8
console.log(my_var.multiplicationTableText)
Output:
3 x 0 = 0
3 x 1 = 3
3 x 2 = 6
3 x 3 = 9
3 x 4 = 12
3 x 5 = 15
3 x 6 = 18
3 x 7 = 21
MIT