Your for loop overwrites innerHTML of demop every time it executes. Therefore, when your for loop reaches the last iteration a , it will be 10 and therefore you will only get the last value "10 * 10 = 100"
So you have to add the result every time you repeat the for loop, just do it like this
demop.innerHTML += (value + "*" + a + "=" + (value*a) + "<br />");
So, you will get your output on separate lines.
source share