10 Interview questions in javascript.

Saymon Shoab
2 min readMay 15, 2021

1.Describe null & undefined.

(null) is a special data type. Basically, we use it for an object. if we don't have any object in a variable you can define null as a value on that object and get output null in the console.

(undefined). you can get undefined in the console when you don't have any value. That means a variable without value always get output (undefined)

2.Describe Double equal (==) vs triple equal(===).

The deference between double equal and triple equal is , double equal can not check the data type and triple equal can check data type.

3.Describe Truthy vs Falsy.

some time you see true and false when you write condition in javascript. if your condition is match with the user input or variable value you can get true in the console or UI. but the condition are not match you will get false.

some value fo true and false

4.Describe HTTP (get & post).

HTTP get is a process of getting data from the server. for example you search something on google and google give you the answer. as a developer, you get data from API by using fetch.

HTTP post is a process of pass data from user to database. for example you always post picture and stutas on your facebook. and your data always save in a database even you logg out.

5.What is event bubble in javascript?

event bubble means to bubble up events from child to parent. for example, you have a li and li inside a ul, ul inside a div now if you click the child list javascript event bubble can check the parent also. if the parent has an event javascript take action in it or if it has no event javascript go to the next parent like div. this is the short story of the event bubble.

6.Describe global variable & global scope.

global variable means every function can access the variable and javascript can take action on it. if you declare a variable inside a function you can access it only inside the function otherwise you can not access it outside the function. because the variable is local.

7.Describe (this keyword).

8.Describe the event loop.

javascript run step by step. it happens by the event loop. as a javascript developer we write many function in our projects. javascript can run the first function then the second one then the next one it make stack and then it take action on queue

9.how to remove similar item from an array?

10.Describe arrow function?

arrow function is so simple then regular function. arrow function is use in es6.

--

--