Question:- What are the pop-up boxes available in JavaScript?
Answer:- - Alert Box - Confirm Box - Prompt Box
Question:- How can we detect OS of the client machine using JavaScript?
Answer:- The navigator.appVersion string can be used to detect the operating system on the client machine.
Question:- Is JavaScript faster than ASP script?
Answer:- Yes, because it doesnt require web servers support for execution.
Question:- How to handle exceptions in JavaScript?
Answer:- By the help of try/catch block, we can handle exceptions in JavaScript. JavaScript supports try, catch, finally and throw keywords for exception handling.
Question:- What is the requirement of debugging in JavaScript?
Answer:- JavaScript didnt show any error message in a browser. However, these mistakes can affect the output. The best practice to find out the error is to debug the code. The code can be debugged easily by using web browsers like Google Chrome, Mozilla Firebox. To perform debugging, we can use any of the following approaches: Using console.log() method Using debugger keyword
Question:- What is the use of debugger keyword in JavaScript?
Answer:- JavaScript debugger keyword sets the breakpoint through the code itself. The debugger stops the execution of the program at the position it is applied. Now, we can start the flow of execution manually. If an exception occurs, the execution will stop again on that particular line.
Question:- What is the role of a strict mode in JavaScript?
Answer:- The JavaScript strict mode is used to generates silent errors. It provides "use strict"; expression to enable the strict mode. This expression can only be placed as the first statement in a script or a function.
Question:- What is the use of a Date object in JavaScript?
Answer:- The JavaScript date object can be used to get a year, month and day. You can display a timer on the webpage by the help of JavaScript date object.
Question:- What is the use of a Number object in JavaScript?
Answer:- The JavaScript number object enables you to represent a numeric value. It may be integer or floating-point. JavaScript number object follows the IEEE standard to represent the floating-point numbers.
Question:- What is the use of a Boolean object in JavaScript?
Answer:- The JavaScript Boolean is an object that represents value in two states: true or false. You can create the JavaScript Boolean object by Boolean() constructor.
Question:- What is the use of a TypedArray object in JavaScript?
Answer:- The JavaScript TypedArray object illustrates an array like a view of an underlying binary data buffer. There is any number of different global properties, whose values are TypedArray constructors for specific element types.
Question:- What is the use of a Set object in JavaScript?
Answer:- The JavaScript Set object is used to store the elements with unique values. The values can be of any type i.e. whether primitive values or object references.
Question:- What is the use of a WeakSet object in JavaScript?
Answer:- The JavaScript WeakSet object is the type of collection that allows us to store weakly held objects. Unlike Set, the WeakSet are the collections of objects only. It doesnt contain the arbitrary values.
Question:- What is the use of a Map object in JavaScript?
Answer:- The JavaScript Map object is used to map keys to values. It stores each element as key-value pair. It operates the elements such as search, update and delete on the basis of specified key.
