Which is the correct JavaScript statement to display 'Hello Boss!' into an alert box?

14. Which is the correct JavaScript statement to display "Hello Boss!" into an alert box?

  1. alert("Hello Boss!");
  2. alert('Hello Boss!');
  3. alert(Text:'Hello Boss!');
  4. Both A. and B.

Answer: D) Both A. and B.

Explanation:

The both of statement are correct to display "Hello Boss!" into an alert box:

window.alert("Hello Boss!");
window.alert('Hello Boss!');

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.