Q. What is the object type?
The object type refers to a compound value where you can set properties (named locations) that each hold their own values of any type. Bracket notation is also useful if you want to access a property/key but the name is stored in another variable, such as:
Q. What is equality in JavaScript ?
JavaScript has both strict and type–converting comparisons: Some simple equality rules:
Q. What is typeof operator?
JavaScript provides a typeof operator that can examine a value and tell you what type it is:
How do you clone an object? Javascript object clone
Javascript object clone Now the value of objclone is {a: 1 ,b: 2} but points to a different object than obj. Note the potential pitfall, though: Object.assign() will just do a shallow copy, not a deep copy. This means that nested objects aren’t copied. They still refer to the same nested objects as the original:
What is a “closure” in JavaScript? Provide an example of closure
A closure is an inner function that has access to the variables in the outer (enclosing) function’s scope chain. example: