Web / ES6 Interview questions
let and const keywords.
5.
Explain arrow function in ES6.
6.
Difference between const vs Object.freeze().
7.
What is Promise.race()?
1. Difference between Named Exports and Default exports in ES6.
Named Exports can export multiple values and must use the exported name when importing. Default Exports export a single value and can use any name when importing.
2. What is ES6 or ECMAScript 2015?
ES6 was released in June 2015 as the sixth edition of the language. Initially, it was named ES6 and later renamed to ECMAScript 2015....
3. What is ECMAScript?
ECMAScript is a specification that is defined in the ECMA-262 standard to create a general-purpose scripting language.
4. Explain let and const keywords.
The variables declared using let keyword will be mutable and the values can be changed at anytime. It is similar to var keyword except that it provides block scoping....
5. Explain arrow function in ES6.
Arrow functions are the shorthand notation to write ES6 functions. The definition of the arrow function consists of parameters, followed by an arrow (=>) and the body of the function....
6. Difference between const vs Object.freeze().
const applies to bindings ("variables"). It creates an immutable binding, i.e., you cannot assign a new value to the binding.
7. What is Promise.race()?
The Promise.race() method returns a promise that fulfills or rejects as soon as one of the promises in an iterable fulfills or rejects, with the value or reason from that promise. const promise1 = new Promise((resolve, reject) => { setTimeout(resolve,...