# Function /array can also have property. arr.prop=3
# Properties can be accessed by bracket syntax arr[“prop”]
# Using bracket syntax I can add property with space like, arr[“full name“] = “Anshu Kumar”;
# Can add or access properties using loop.
NaN is special number. Returned after error nous calculation.
**NaN is not equal to NaN(True).
ParseInt- convert value into number
Stops at first non digit number.
we can extend the common functions functionality by prototype.. like for Trim and reverse functions.
Splice(start-index, element-count) : Do not make a hole in the array. Like in case of using delete –undefined value is get added at the deleted place.
Null(was before there) and undefined(not initialized default value of variables) are not object.
**Typeof(null) return Object which is wrong. Null is not a object.
Falsy values ( False, null, undefined,””,0, NaN) if put inside If(..) will return false.
Throw— throw any thing object/ error
Try–will have only one catch clause.
Event Loop check the task/callback queue and if there is something it push that thing into the call stack.
x = 5; // Assign 5 to x
var x; // Declare x
Window is the parent of the webpage.Collector of everything i.e. global.
Closure: The context of an inner function(callbacks) include the scope of outer function. Inner function has access to the outer enclosing function’s variables and global variables.
Context / this :
The prototype property allows you to add new properties and methods to existing object types.