Now is all the Interview Questions Answer here.
JavaScript types:-
- Boolean type.
- Null type.
- Undefined type.
- Number type.
- BigInt type.
- String type.
- Symbol type.
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:-
A 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.
·
A 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. |
0 Comments
Please do not enter any spam link in the comment box.-------------