What is a programming language?
A programming language is basically just a tool that allows us to write code that will instruct a computer to do something
HIGH-LEVE means We don't' have to worry about complex stuff like memory management
OBJECT-ORIENTED means Based on an object,for storing most kinds of data
MULTI-PARADIGM means We can use different styles of programming like imperative and declarative programming
What is DOM?
DOM stands for Document Object Model. It is the representation of a web page in the form of a tree structure where each node contains an object.
What is event propagation?
Event Propagation is the mechanism that defines how the event travels through the DOM tree to arrive at its target.
For example, if we have a link inside a div element and we have a onclick handler on the link then it will be executed as expected. But if we place the handler on the div instead of the link, and then click on the link, the handler will still be executed. This is called Event Propagation.
What’s the purpose of web workers?
To execute expensive tasks on a separate thread than the main thread.
What is event capturing?
When we click on the tag associated with the event handler, the event travels all the way from the window through the DOM tree to its target. For example, if we click on a hyperlink, then the event will pass through the html element, the body element and the div element containing that link. If any of these tags have a capturing event listener, then it will also get executed. This is called event capturing.
What is event bubbling?
This is the exact opposite of event capturing. In this case, the event will travel back from the target to the window through the DOM tree. For example, when clicked on the hyperlink it will move to the div, body element and the html element.
What is event.target?
Event Target property returns the element that triggered the event. It gives access to the properties of the element that originally triggered the event. We can access the properties of the element using event.target.propertyName.
What’s the difference between setTimeout() and setInterval()?
setTimeout executes once after a specified time has elapsed.
setInterval executes repeatedly with a given delay between executions.
What is the difference between == and === operators?
What’s the difference between importing a default export, named, and a non-deafult export?
Function declarations are hoisted, and function expressions are not hoisted. Is that true?
How does the Maximum Call Stack Exceeded error get executed?
While a function is recursively calling itself, the ‘Stack’ of function calls waiting to execute grows until a maximum is reached.
What is a lexical scope?
The scope of an inner function that contains the scope of the parent function.
What is the difference between undefined and null?
What does the double bang(!!) do?
Returns the truth value of an object.
What is Hoisting?
Why are functions called first class objects?
What is the difference between an argument and a parameter?
When we are declaring a function, the variables we put in between the parenthesis (), are called function parameters. On the other hand, when we are calling a function, the values passed in between the parenthesis are called arguments which eventually are assigned to the parameters of the function.
What is the strict mode?
What is the difference between an alert box and a confirmation box?
What is a cookie
What is the main difference between localStorage and sessionStorage
What is a promise
What are the three states of promise?
What is callback hell?
How to store boolean values in localstorage?
What is the difference between for..in and for..of?
Explain passed by value and passed by reference.
Explain call(), apply() and, bind() methods.
What is memoization?
What are arrow functions?
Differences between declaring variables using var, let and const.
What are the rest parameter and spread operator?
What is Object Destructuring?
What is the purpose of the array slice method?
What is the purpose of the array splice method?