What are the tools or techniques used for debugging JavaScript code?

Posted by Editorial Staff | Updated on | JavaScript interview


You can use below tools or techniques for debugging javascript Chrome Devtools debugger statement Good old console.log statement

What is the difference between native host and user objects?

Posted by Editorial Staff | Updated on | JavaScript interview


Native objects are objects that are part of the JavaScript language defined by the ECMAScript specification. For example, String, Math, RegExp, Object, Function etc core objects defined in the ECMAScript spec. Host objects are objects …

What is eval in Javascript?

Posted by Editorial Staff | Updated on | JavaScript interview


The eval() function evaluates JavaScript code represented as a string. The string can be a JavaScript expression, variable, statement, or sequence of statements.

What are classes in ES6

Posted by Editorial Staff | Updated on | JavaScript interview


What are classes in ES6 In ES6, Javascript classes are primarily syntactic sugar over JavaScript’s existing prototype-based inheritance. For example, the prototype based inheritance written in function expression as below, Whereas ES6 classes can be …

What is Hoisting

Posted by Editorial Staff | Updated on | JavaScript interview


What is Hoisting Hoisting is a JavaScript mechanism where variables and function declarations are moved to the top of their scope before code execution. Remember that JavaScript only hoists declarations, not initialisation. Let’s take a …

What is the purpose of the let keyword in JavaScript?

Posted by Editorial Staff | Updated on | JavaScript interview


What is the purpose of the let keyword in JavaScript? The let statement declares a block scope local variable. Hence the variables defined with let keyword are limited in scope to the block, statement, or …

What is the currying function in JavaScript?

Posted by Editorial Staff | Updated on | JavaScript interview


What is the currying function in JavaScript? Currying is the process of taking a function with multiple arguments and turning it into a sequence of functions each with only a single argument. Currying is named …

What is a unary function in Javascript?

Posted by Editorial Staff | Updated on | JavaScript interview


What is a unary function in Javascript? Unary function (i.e. monadic) is a function that accepts exactly one argument. Let us take an example of unary function. It stands for a single argument accepted by …

What is a higher order function?

Posted by Editorial Staff | Updated on | JavaScript interview


What is a higher order function? Higher-order function is a function that accepts another function as an argument or returns a function as a return value.

What is a first order function?

Posted by Editorial Staff | Updated on | JavaScript interview


What is a first order function? First-order function is a function that doesn’t accept another function as an argument and doesn’t return a function as its return value.

What is a first class function?

Posted by Editorial Staff | Updated on | JavaScript interview


What is a first class function? In Javascript, functions are first class objects. First-class functions means when functions in that language are treated like any other variable. For example, in such a language, a function …

What are lambda or arrow functions?

Posted by Editorial Staff | Updated on | JavaScript interview


What are lambda or arrow functions? An arrow function is a shorter syntax for a function expression and does not have its own this, arguments, super, or new.target. These functions are best suited for non-method …

What is the difference between == and === operators?

Posted by Editorial Staff | Updated on | JavaScript interview


JavaScript provides both strict(===, !==) and type-converting(==, !=) equality comparison. The strict operators take type of variable in consideration, while non-strict operators make type correction/conversion based upon values of variables. The strict operators follow the …

How do you compare Object and Map?

Posted by Editorial Staff | Updated on | JavaScript interview


How do you compare Object and Map? Objects are similar to Maps in that both let you set keys to values, retrieve those values, delete keys, and detect whether something is stored at a key. Due to this …

What is the difference between slice and splice?

Posted by Editorial Staff | Updated on | JavaScript interview


Some of the major difference in a tabular form Slice Splice Doesn’t modify the original array(immutable) Modifies the original array(mutable) Returns the subset of original array Returns the deleted elements as array Used to pick …