πŸ“Š JavaScript
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
πŸ’¬ Discuss
βœ… Correct Answer: (A) getElementById("result").innerHTML = 10+20;

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
204
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
80%
Success Rate