A

Admin • 833K Points
Coach

Q. How do you write “Hello World” in an alert box?

  • (A) msg("Hello World");
  • (B) alert("Hello World");
  • (C) msgBox("Hello World");
  • (D) alertBox("Hello World");
  • Correct Answer - Option(B)
  • Views: 27
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

alert() is a build-in function in javascript which is used to give message to the visitor.

<script>
alert("Welcome to MCQ Buddy");
</script>
This code will give user a message Welcome to MCQ Buddy.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.