Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
2 views
in Web Technology by (45k points)

A) document.write("Hello World");

B) echo "Hello World";

C) response.write("Hello World");

D) ("Hello World");

E) All of the above

2 Answers

0 votes
by (99k points)

The correct answer to the question is “What is the correct JavaScript syntax to write "Hello World" is option (a). document.write(“Hello World”). This JavaScript command prints everything that is typed in between the parenthesis. If you are interested in learning JavaScript, then check out the Web Development courses, which give you packaged courses, which gives you online training and guided projects and exercises to help you with the practical skills. Also, check out the YouTube video on JavaScript Training video.

0 votes
by (1.8k points)

The Appropriate syntax to print “Hello World”  in javascript is using the below syntax

document.write(“Hello World”)

In the above command document is the object in JS that represents the entire HTML document while write is the method with the help of which we are able to write it into an HTML page.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...