my current code currently prints a table to the console, but I want the table to be formatted so every column and row are aligned perfectly. I can do that using an HTML table, but I would prefer just printing in the console.
console.log(multiplicationTable(12));
function multiplicationTable(max)
{
var i,j;
for( i = 1; i<=max ; i++)
{
for( j = 1; j<=max; j++)
{
document.write( i*j + " " );
}
document.write("<br>");
}
}
Thanks a lot!