Multiple choice technology programming languages

document.getElementById("trial").innerHTML() is a valid statement

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

innerHTML is a property, not a method, so it cannot be called with parentheses. The correct syntax is document.getElementById('trial').innerHTML = 'value' to set content, or var content = document.getElementById('trial').innerHTML to read content. Adding () makes it a function call which will cause an error.