I am assuming that js file name is message.js, place the following script tag inside the head tag.More details...
6) What is BOM?
BOM stands for Browser Object Model. It provides interaction with the browser. The default object of browser is window.More Details: Browser Object Model
7) What is DOM? What is the use of document object?
DOM stands for Document Object Model. A document object represent the html document. It can be used to access and change the content of html.More Details: Document Object Model
8) What is the use of window object?
The window object is automatically created by the browser that represents a window of a browser.
It is used to display the popup dialog box such as alert dialog box, confirm dialog box, input dialog box etc.More details...
9) What is the use of history object?
The history object of browser can be used to switch to history pages such as back and forward from current page or another page. There are three methods of history object.
13) What is the difference between == and ===?
The == operator checks equality only whereas === checks equality and data type i.e. value must be of same type.
Let's see a simple code to create object using object literal.More details...
Let's see a simple code to create array using object literal.More details...
18) What does the isNaN() function?
The isNan() function returns true if the variable value is not a number.
3030 because 10+20 will be 30. If there is numeric value before and after +, it is treated is binary + (arithmetic operator).
102030 because after a string all the + will be treated as string concatenation operator (not binary +).
22) In which location cookies are stored on the hard disk?
The storage of cookies on the hard disk depends on OS and the browser.
The Internet Explorer stores the cookies on a file email@example.com. The path is: c:\Windows\Cookies\username@Website.txt.
24) What is the difference between undefined value and null value?
Undefined value: A value that is not defined and has no keyword is known as undefined value. For example:
Null value: A value that is explicitly specified by the keyword "null" is known as null value. For example:
25) What is this?
Ans: Three dimensional array.
27) What is negative infinity?
28) What is difference between View state and Session state?
"View state" is specific to a page in a session whereas "Session state" is specific to a user or browser that can be accessed across all pages in the web application.
The navigator.appVersion string can be used to detect the operating system on the client machine.
Yes, because it doesn't require web server's support for execution.
Other Interview QuestionsCore Java Interview Questions
Servlet Interview Questions
JSP Interview Questions
SQL Interview Questions
PL/SQL Interview Questions
Android Interview Questions