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
Link to the challenge: