Web-Technologies
January 3, 2025Compiler-Design
January 3, 2025Web-Technologies
|
Question 50
|
Which of the following is the correct Javascript syntax to display “Hello World”?
|
println(“Hello World”)
|
|
|
system.out.print(“Hello world”)
|
|
|
document.write(“Hello world”)
|
|
|
response.write(“Hello World”)
|
Question 50 Explanation:
→The write() method writes HTML expressions or JavaScript code to a document.
→Write HTML elements with text directly to the HTML document:
→document.write(” < h1 > Hello World!< /h1 > < p > Have a nice day! < /p > “);
→Write HTML elements with text directly to the HTML document:
→document.write(” < h1 > Hello World!< /h1 > < p > Have a nice day! < /p > “);
Correct Answer: C
Question 50 Explanation:
→The write() method writes HTML expressions or JavaScript code to a document.
→Write HTML elements with text directly to the HTML document:
→document.write(” < h1 > Hello World!< /h1 > < p > Have a nice day! < /p > “);
→Write HTML elements with text directly to the HTML document:
→document.write(” < h1 > Hello World!< /h1 > < p > Have a nice day! < /p > “);
