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
Join WhatsApp and Telegram groups for daily job updates: Link
Prepare for Technical Round with Interview Questions: Link
Get insights into HR Interview Questions: Link
Craft a standout resume for Quick shortlisting: Link
Assessment with a Mock Test: Link
Colgate Mock Test with Aptitude and Coding Assessment: Click Here
Understand Colgate Recruitment Process, Test, and Exam Pattern: Link
Explore Global Opportunities for Professionals & Freshers Abroad: Link
TCS NQT 2023 Careers: Graduate Trainee Hiring: Link
PwC Internships 2023: Opportunities in Zurich, Switzerland: Link
Chandrayaan 3: India’s Upcoming Lunar Mission Expectations: Link