Challenge: Solution Review
This lesson will explain the solution to the problem from the previous coding challenge.
We'll cover the following...
Solution #
Press + to interact
class Shape{constructor(color, sides, name){this.color = color;this.sides = sides;this.name = name;}}var shape = new Shape("blue","4","Square")console.log(shape)
Explanation
The ES6 version of JavaScript uses classes that are defined using the class
keyword to implement the constructor ...