Java Script Interview Question and Answer

97. Is JavaScript case sensitive? Give an example?
Yes, JavaScript is case sensitive. For example, a function parseInt is not same as the function Parseint.

98. How to delete a Cookie using JavaScript?
Sometimes you will want to delete a cookie so that subsequent attempts to read the cookie return nothing. To do this, you just need to set the expiration date to a time in the past.

99. How to create array in JavaScript?
There are 3 ways to create array in JavaScript.
By array literal
By creating instance of Array
By using an Array constructor
Let’s see a simple code to create array using object literal.

100. Difference between Client side JavaScript and Server side JavaScript?
Client side JavaScript comprises the basic language and predefined objects which are relevant to running java script in a browser. The client side JavaScript is embedded directly by in the HTML pages. This script is interpreted by the browser at run time.
Server side JavaScript also resembles like client side java script. It has relevant java script which is to run in a server. The server side JavaScript are deployed only after compilation.

101. How to set the cursor to wait in JavaScript?
The cursor can be set to wait in JavaScript by using the property “cursor”. The following example illustrates the usage:

COPY CODE SNIPPET