Home / Report Question

Q. Which is the correct JavaScript statement to print the addition of two numbers 10 and 2o in a paragraph whose id is "result"?
  • A. getElementById("result").innerHTML = 10+20;
  • B. getElementById("result").innerHTML = "10+20";
  • C. getElementById("#result").innerHTML = 10+20;
  • D. All of the above