Choose the correct JavaScript statement which helps you to write "World of JavaScript" in a web page.
Answer options
A
write("World of JavaScript")
B
System.out.println("World of JavaScript")
C
document.write("World of JavaScript")
D
println("World of JavaScript")
Correct answer: document.write("World of JavaScript")
Explanation
document.write() is the correct JavaScript method for writing content to the HTML document. System.out.println is Java syntax, and plain write() or println() are not valid browser JavaScript functions.