// program to display text 10 times
const n = 10;
// looping from i = 1 to 10
for (let i = 1; i <= n; i++) {
console.log(`I love JavaScript.`);
}
I try to replace console.log
with document.getElementById("demo").innerHTML = "I love JavaScript"
, but can't replicate the example.
` exactly?
– M0nst3R Mar 01 '22 at 13:52