Here is Answer of Previous Blog Interview Questions | CodewithHarsh

 Now is all the Interview Questions Answer here.

Answer 1:-

JavaScript types:-

  •  Boolean type.
  •  Null type.
  •  Undefined type.
  •  Number type.
  • BigInt type.
  • String type.
  • Symbol type.

Answer 2:-

JavaScript Hoisting refers to the process whereby the interpreter appears to move the declaration of function, variables or classes to the top of their scope, prior to execution of the code. Hoisting allows function to be safely used in code before they are declared.

Answer 3:-

JavaScript Function Invocation is used to executes the function code and it is common to use the term “call a function” instead of “invoke a function”. The code inside a function is executed when the function is invoked

Answer 4:-

A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). In other words, a closure gives you access to an outer function scope from an inner function.

Answer 5:-

The prototype is an object that is associated with every functions and objects by default in JavaScript, where function prototype property is accessible and modifiable and object's prototype property (aka attribute) is not visible. Every function includes prototype object by default. Prototype in JavaScript.

Answer 6:-

  • Call invokes the function and allows you to pass in arguments one by one.
  •  Apply invokes the function and allows you to pass in arguments as an array.
  • Bind returns a new function, allowing you to pass in a this array and any number of arguments.

Answer 7:-

In computer science, recursion is a programming technique using function or algorithm that calls itself one or more times until a specified condition is met at which time the rest of each repetition is processed from the last one called to the first.

Answer 8:-

A WeakMap is a collection of key/value pairs whose keys must be objects, with values of any arbitrary JavaScript type, and which does not create strong references to its keys. That is, an object's presence as a key in a WeakMap does not prevent the object from being garbage collected.

Answer 9:-

temporal dead zone (TDZ) is the area of a block where a variable is inaccessible until the moment the computer completely initializes it with a value.

·         block is a pair of braces ({...}) used to group multiple statements.

·         Initialization occurs when you assign an initial value to a variable.

 Answer 10:-

var

let

const

It can be declared without initialization.

It can be declared without initialization.

It cannot be declared without initialization.

 



Post a Comment

0 Comments