How recursion works ?
A recursive function calls itself, the memory for a called function is allocated on top of memory allocated to calling function and different copy of local variables is created for each function call. When the base case is reached, the function returns its value to the function by whom it is called and memory is de-allocated and the process continues.
Recursion vs Iteration
The concept of Recursion and Iteration is to execute a set of instructions repeatedly. The difference between them is that recursion is simply a method call in which the method being called is the same as the one making the call while iteration is when a loop is repeatedly executed until a certain condition is met.
What is DOM ?
The Document Object Model (DOM) is a programming interface for HTML and XML documents. It represents the page so that programs can change the document structure, style, and content. The DOM represents the document as nodes and objects.
What is Callback Function ?
A callback function is a function passed into another function as an argument, which is then invoked inside the outer function to complete some kind of routine or action.
What are APIs ?
Application Programming Interfaces (APIs) are constructs made available in programming languages to allow developers to create complex functionality more easily. They abstract more complex code away from you, providing some easier syntax to use in its place.
What is Closure ?
Null vs Undefined
Null means an empty or non-existent value. Null is assigned and explicitly means nothing. while undefined typically means a variable has been declared but not defined yet.
Double equals (==) vs Triple equals (===)
Double equals (==) will perform a type conversion when comparing two things and will handle NaN, -0, and +0 (so
NaN != NaN, and
-0 == +0);
Triple equals ( === ) will do the same comparison as double equals (including the special handling for NaN, -0 and +0 ) but without type conversion; if the types differ, false is returned.