JavaScript Interview Questions and Answers
JavaScript vs Jquery | JavaScript vs VBScript | JavaScript vs TypeScript |
Ques 46. What is a prompt box?
A prompt box allows the user to enter input by providing a text box.
Ques 47. Can javascript code be broken in different lines?
Breaking is possible within a string statement by using a backslash \ at the end but not within any other javascript statement.
that is ,
document.write("Hello \ world");
is possible but not document.write \
("hello world");
Ques 48. To put a "close window" link on a page?
<a href='javascript:window.close()' class='mainnav'> Close </a>
Ques 49. How to hide javascript code from old browsers that dont run it?
Use the below specified style of comments -->