JavaScript Interview Questions and Answers for 2021

Tanvir Shakil
2 min readMay 8, 2021

Javascript is a high-level server-side programming language.

1. What is Javascript?

javascript is a client-side and server-side scripting language inserted into HTML pages and is understood by web browsers. JavaScript is also an Object-based Programming language

2. What are JavaScript Data Types?

Number, String, Boolean, Object, Undefined

3. What is ‘this’ keyword in Javascript?

“This” keyword refers to the object from where it was called

4. Difference between “==” and “===”?

“==” checks only for equality in value, whereas “===” is a stricter equality test and returns false if either the value or the types of the two variables are different.

5. what do you mean NULL in Javascript?

The NULL value is used to represent no value or no object or no object. It implies no object or null string, no valid boolean value, no number, an array object.

6. what is an undefined value in javascript?

.variable used in the code doesn’t exist , variable is not assigned to any value . property does not exist. the variable is not assigned to any value

7. what is the use of Void (0)?

Void(0) is used to prevent the pages from refreshing, and parameter “zero‘ is passed while calling.

8. what a pop() method in javascript?

The pop() method is similar to the shift() method, but the difference is that the shift method works at the array’s start. The pop() method takes the last element off the given array and returns it

9. what is indexedDB?

IndexDB is a low-level API for client-side storage or larger amounts of structured data, including files/blobs. This API uses indexed to enable high-performance searches of this data

10. what is web storage?

web storage is an API that providers a mechanism by which browsers can store key/value Paris locally within the user’s browser, in a much more intuitive fashion than using cookies

--

--