I was tasked by my professor to make a simple Javascript program that displays simple math problems and their answers in a two dimensional table using a random number. Previously he gave us the example of using a function to write into a table like this:
function RandomGen() {
Random = math.floor(Math.random()*60);
document.writeln("<th>");
document.writeln(Random);
document.writeln("</th>");
}
RandomGen();
In order to use an array, can I do this?
var RandomArray [
RandomGen(),
second_function(),
third_function(),
forth_function(),
]
RandomArray[0];
How do I append the functions together to write into a table?