ES6 JavaScript Classes the Easy Way (Skillshare)

ES6 JavaScript Classes the Easy Way (Skillshare)
Free Course
Categories
Effort
Certification
Languages
Misc

MOOC List is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

ES6 JavaScript Classes the Easy Way (Skillshare)
In 2015, the JavaScript programming language got a major facelift with many improvements to the syntax and tons of new features. This new version is known as ES6, or ES2015, and each year since an updated version has been released. ES6 Classes, as well as instance and static methods, are vitally important to know and understand because so many projects and companies are migrating to the newest version of JavaScript. Many Front End libraries, such as React, rely heavily on the new Class syntax.

MOOC List is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

They might look very confusing, but ES6 Classes are very easy to pick up once you know the basics.

A brand new skyscraper in New York City has an indoor parking garage for its tenants, maintenance crew, and visitors. Hiring a parking garage attendant for such a big building would be quite expensive and slow because thousands of cars would be entering and exiting the building every day, and a human attendant would not be able to keep up with the fast pace.

You are a software developer, and the building has hired you to write some automated software that will replace the parking garage attendant. And if it proves to be successful, you can sell the same software to other buildings and public parking lots as well and become a millionaire! But you will have to use Classes in order to make everything work as expected.

1. Think about the Classes you'll have to create: the parking garage, the parking spot, the type of vehicle, etc. What properties do each of those classes need to have?

2. When you create a parking garage or a parking lot, each spot is given a number starting at 1.

3. When a car enters, a ticket is given to the driver. In order to issue a ticket, you have to record the license plate and the color of the car. In addition, you must assign the car an available parking spot.

4. When the car leaves, the parking spot it occupies should become available so that another.



MOOC List is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Free Course

MOOC List is learner-supported. When you buy through links on our site, we may earn an affiliate commission.