- Single Line Comment: It is represented by // (double forward slash)
- Multi Line Comment: It is represented by slash with asterisk symbol as /* write comment here */
42. What is the difference between == and ===?
The == operator checks equality only whereas === checks equality and data type i.e. value must be of same type.
- By object literal
- By creating instance of Object
- By Object Constructor
Let’s see a simple code to create object using object literal.
46. What does the isNaN() function?
The isNaN() function returns true if the variable value is not a number.
47.What do mean by prototype design pattern?
102030 because after a string all the + will be treated as string concatenation operator (not binary +).