ES6 Interview Questions - ECMAScript 2015 interview questions

ES6 Interview Questions - ECMAScript 2015 interview questions
0.0 0

#1

Hello friends,
I have created some interview questions on Es6.Request you guys to review the questions and answers.You can also recommend new questions in Comments.
Thannks
https://www.onlineinterviewquestions.com/es6-interview-questions/


#2

OK start, but needs a lot of work, it’s littered with typos.

And among other things:

Webpack allows you to run an environment that hosts babel

Webpack bundles modules among other things, depending on what plugins are used/how it is configured to call other programs. So that is true, but WebPack has nothing to do with Babel per se - you can tell it to use Babel to transpile your code before bundling, but you can use Babel just fine without WebPack.

Constants also are known as immutable variables are a special type of variables whose content is not changed

The variable is immutable, but the content (the value assigned to the variable) is not automatically immutable. It does not mean the value cannot be changed, just that the variable itself cannot be rebound to a different value.

The spred stuff doesn’t really explain what it is. Also yes, the first example is an example of the spread operator, but this

function print(...z){
	console.log(z); 
}

Is an example of the rest operator. Same syntax, but in different contexts it’s a different thing.