3. Difference between “==” and “===”?
The basic difference between “==” checks only for equality of values but “===” used to check not only the equality of value but also its data types. In both of the case if the condition doesn’t match it will return false and true otherwise. They are both conditional operator with some differences.
4. Why do we use “use strict” at the beginning of the JS file?
This is one of the common questions that can be asked in an interview. “use strict” is a method that is used so that the code run in strict mode. It also used for handling errors at runtime and some errors that might be ignored in this mode. This an important topic to cover for interviews.
5. What is NaN?
NaN is a property that denotes a result that is not a number. It is a property of the global object. In other words, it is a variable in the global scope. The isNaN() is a function that determines whether a value is an illegal number or not. When the function finds a value of that condition it returns true, false otherwise.
7. What is functional programming?
Functional programming is a procedure where applications are built by creating and applying functions of different forms. It is a decisive programming worldview in what function definitions are trees of articulations that guide esteems to different qualities, instead of an arrangement of basic explanations which update the running condition of the program.
9. For what reason do we wrap the substance of the JS document into a single function block?
This is done to make a conclusion around record substance which makes a private namespace and along these lines helps in settling name conflicts among modules and libraries.
10. How does a cookie is read in JS?