i) If you define a variable but not assign value.
ii) Write a function without return any value.
iii) Want to access an object property which is not exist
iv) If you directly assign undefine as a variable value.
v) If you want to access value from array index but this index does not exist.
Double Equal (==) and Triple Equal (===)
In ES6, const let and var keywords allow developers to declare variables. Let and const is block scope. which means those variables exist only within the corresponding block.
slice() is a built-in method that returns the selected element in an array. let’s see how does slice() method work…
splice()is a built-in method that adds/remove an item to/from an array and returns the removed item.
filter() method creates an array filled with all array elements that pass the test implemented by the provided function.