DEV Community

Cover image for 10 Javascript interview questions that will help you taking preparation
Asikur Rahman
Asikur Rahman

Posted on

10 Javascript interview questions that will help you taking preparation

  1. What is the difference between null and undefined?
    Answer: Null means to cancel out something or not the existence of something that means if we set a variable null, we can say that there is nothing in the variable.
    But undefined can happen in many ways if we want to access a parameter that is not passed then we get undefined if we just declare a variable without values then it will show undefined if we want to access a property of an object which is not present there that will also give us undefined.
    this will be enough to explore that you know something about that question.

  2. Difference between double equal(==) and triple equal(===)?
    Answer: Triple equal is very strict it will show the type of variable that is compared but double equal is not so strict it will convert the variable into the same type and then check. For example:
    Alt Text

Top comments (0)