Home »
MCQs »
JavaScript MCQs
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?
- alert("Hello Boss!");
- alert('Hello Boss!');
- alert(Text:'Hello Boss!');
- 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!');