4. What is the use of isNaN function?
isNan function returns true if the argument is not a number otherwise it is false.
7. What is a prompt box?
A prompt box is a box which allows the user to enter input by providing a text box. Label and box will be provided to enter the text or number.
- Local Variables − A local variable will be visible only within a function where it is defined. Function parameters are always local to that function.
- Using a web page and Active X objects
12. Explain the difference between “==” and “===”?
“==” checks only for equality in value whereas “===” is a stricter equality test and returns false if either the value or the type of the two variables are different.
13. What is Closure? Give an example.
14. How does TypeOf Operator work?
The typeof operator is used to get the data type of its operand. The operand can be either a literal or a data structure such as a variable, a function, or an object. It is a unary operator that is placed before its single operand, which can be of any type. Its value is a string indicating the data type of the operand.
The simplest way to create a cookie is to assign a string value to the document.cookie object, which looks like this-
document.cookie=”key1 = value1; key2 = value2; expires = date”;
- Const – The idea of const functions is not allow them to modify the object on which they are called. When a function is declared as const, it can be called on any type of object.
- Let – It is a signal that the variable may be reassigned, such as a counter in a loop, or a value swap in an algorithm. It also signals that the variable will be used only in the block it’s defined in.
- Server interaction is less
- Feedback to the visitors is immediate
- Interactivity is high
- Interfaces are richer
No support for multithreading
No support for multiprocessing
Reading and writing of files is not allowed
No support for networking applications.
I am assuming that js file name is message.js, place the following script tag inside the head tag.
document.writeln(msg); // It will not display the result.
21. What is BOM?
22. What is the use of history object?
The history object of a browser can be used to switch to history pages such as back and forward from the current page or another page. There are three methods of history object.
- history.back() – It loads the previous page.
- history.forward() – It loads the next page.
- history.go(number) – The number may be positive for forward, negative for backward. It loads the given page number.
Single Line Comment: It is represented by // (double forward slash)
Multi-Line Comment: Slash represents it with asterisk symbol as /* write comment here */
24. In which location cookies are stored on the hard disk?
The storage of cookies on the hard disk depends on the OS and the browser.
The Netscape Navigator on Windows uses a cookies.txt file that contains all the cookies. The path is c:\Program Files\Netscape\Users\username\cookies.txt
If You Want To Get More Daily Such Interview Questions Updates Then Press Red Bell Icon At The Right Side of Page To Subscribe our Updates.
Looking For High Paying Jobs: Click here
Also Read:Interview Question In HR Interview: Click here
Join Whatsapp Group of Daily Jobs Updates for 2010-2020 Batch: Click Here
Subscribe Our Telegram Channel for Interview Questions: Click here
Also Read: Daily Morning Skin Care For Glowing Skin: Click here
Also Read:How To Get a Job Easily: Professional Advice For Job Seekers: Click here