12 JavaScript Interview questions : freshers should go through.

Jahid Joni
2 min readMay 8, 2021

Here I will list 12 common javascript interview question frequently asked by hiring team. By this article freshers will be benefited. More questions will be available soon on my blog.

1. What is undefined variable?

Declared variable in program without assigning value is called undefined variable. If program tries to read this variable, an undefined result will be shown.

2. What is global variable?

Global variables are readable from everywhere of the code because it has no scope. With a var keyword, a global variable can be assigned.

var global = “This is global variable”

3. What is === operator?

=== operator is known as strict equality operator. This operator return value after matching value and variable type not only value.

4. What is the difference between == and === operator?

The == operator only checks the equality in value, On the other hand === operator checks the value equality with operands type.

5. What is NULL in javascript?

The Null value is introduced to represent no value or no object. It means there are no value, no string, no number, no array and no boolean value.

6. What is event bubbling?

In javascript DOM allows elements to be nested inside them. As the result the handler of the parent will respond if the handler of the child clicked.

7. What is DOM?

DOM stands for Document Object Model. It is a dynamic object-oriented API for accessing HTML and XHTM documents. It can be imagine as a tree or forest.

8. What is Closure in javascript?

In javascript inner function has access to the outer function variables. This feature of javascript is called closure.

9. What is private variable?

If a variable is declared inside the object with traditional var keyword then this variable will only be accessible by private functions and privileged method. This variable is called private variable.

10. What is callback function?

A callback function is also a function which passed into another function as argument. In javascript functions are object, for this we can pass a function as a object into another function.

11. What is API?

API is stands for Application Programming Interface, it is a software intermediary which allows to communicate several applications.

Ii is a programming code that uses to transmit data between two software.

12. What is the main difference of GET and POST?

By GET method data is requested from a specific resources and POST method submitted data to a specific resource.

--

--

Jahid Joni

Motivated junior web developer looking for a role as front-end web developer. Passionate about building first-class web applications.