Tell us what’s happening:
Describe your issue in detail here.
This lesson seems take a lot of leap… I am following the JAVA curriculum from beginning but this lesson seems mentioned many things that I haven’t come across before. such as " class" " constructor" and try to tell the difference in ES5 and ES6 when I don’t even know what constructor and class’s formulate in ES5
I am now try to understand the concept by watching youtube video… hopefully I will found a video to make me understand. I am not sure if any new Java learner has the same feeling of this class is taking too much leap - or is it just me.
Your code so far
// Only change code below this line
// Only change code above this line
const carrot = new Vegetable('carrot');
console.log(carrot.name); // Should display 'carrot'
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15
Challenge: ES6 - Use class Syntax to Define a Constructor Function
Comparison to what exactly? I can say it again, the ‘constructor’, ‘new’ and ‘this’ keywords are being encountered for the very first time in these curriculums.
A comparison to the ES5 stuff that the learners already knew… Since this module was written for people who know ES5
Since ES6 features are no longer new and are now standard, this section got moved forward in the curriculum and treated as less of a refresher module. But some of the older language still remains.