Intro to JavaScript Classes

Intro to JavaScript Classes

26,596 Просмотров

One of the new features in ES6 is the addition of the `class` keyword.
To be clear, CLASSES DO NOT REALLY EXIST in JavaScript. All the Class functionality is still just a syntactic wrapper around Objects and the JavaScript Prototype chain.
However, that doesn't mean you can't use them to write your code.

Code GIST: https://gist.github.com/prof3ssorSt3v3/7feba342829c302d23bf9186a2682c55

Updated video about new Class features in 2021 - https://www.youtube.com/watch?v=tqBP5ZX8F0c

Тэги:

#MAD9022 #web_development #JavaScript #JS #HTML #JavaScript_tutorial #ES6 #Classes_in_JS #Classes_are_syntactic_sugar #ES2015 #class_keyword #static_keyword #extends_keyword #super_keyword
Ссылки и html тэги не поддерживаются


Комментарии:

@JonEastling23
@JonEastling23 - 28.07.2018 04:17

I love thunder. I love Ferraris, especially the Testarossa. On top of all that there is an awesome intro to classes in JS! This is awesome! Keep up the good work Mr! +1

Ответить
@bossmaen
@bossmaen - 04.01.2019 14:54

Hi Steve, why did you in the end use Car.accelerate() and not ferrari.accelerate()? Isn’t it the point that you have the ferrari inherit the class methods of Car and then use it? Thank you for the explaining btw.

Ответить
@dancruz7845
@dancruz7845 - 23.01.2019 20:46

Thanks again very helpful!

Ответить
@juanyang838
@juanyang838 - 12.03.2019 05:27

Do i understand correct the class function is working like the callback function?

Ответить
@rotrose7531
@rotrose7531 - 17.05.2020 08:40

Everything after being explained by you becomes crystal clear, best teacher. Thank you.

Ответить
@igorr4682
@igorr4682 - 05.09.2020 03:47

😀👍

Ответить
@arinamartens6858
@arinamartens6858 - 11.05.2021 21:13

i just don't get it with static methods. like if i want to use a constructor and static methods, how will i use the class, you know what i mean ? like do i use new Car() or just Car ? if i use Car, i guess constructor isn't calling, right ?

Ответить
@JohnBartmannMusic
@JohnBartmannMusic - 09.08.2021 10:44

This one kicks the pants off the others in terms of clarity and calm delivery. thanks for a super tutorial!

Ответить
@majorasscramps1226
@majorasscramps1226 - 12.09.2021 18:33

very simply put, thanks

Ответить
@chesterxp508
@chesterxp508 - 25.09.2021 12:52

Another very cool tutorial!

Ответить
@douggreene9620
@douggreene9620 - 05.10.2021 17:46

My favorite JavaScript teacher. You rock man!

Ответить
@zakhariihusar6975
@zakhariihusar6975 - 15.01.2022 19:19

Rewatched again to refresh my memory, outstanding intro👏.
I hate classes(because they're too verbose, not as eloquent as functions). Try to omit them whenever I can. But sometimes they're necessary, I didn't find another way to draw bullets in a canvas shooting game.

Ответить
@chtulurr
@chtulurr - 04.03.2022 11:01

Hey Steve. Just wanted to let you know that your videos helped me out tackling a frontend education. I had my first job interview recently and I could answer all the technical questions, so I wanted to thank you for making these videos for FREE and I can't wait to check out your videos on React also. I'm switching career from English teacher to web developer and I just wanted to thank you so much.

Still a long way to go, but I figured it's rare to see a comment that's not about being a beginner (not that there's any problem with it). As a teacher I love when students are taking that knowledge somewhere and you actually made a difference.

And you Sir, actually did. Thank you

Ответить
@dzajakeks5539
@dzajakeks5539 - 23.07.2022 20:58

love this asmr shit driving me crazy

Ответить
@meddhia6231
@meddhia6231 - 22.08.2022 13:54

okay goodjob, I learnt just some few tricks but I didn't got the main stuff, Try to explain every subject from scartch, some people didn't know what is the underscore meant by or the this, construct keywords, TRY TO SIMPILFY THE STUFF YOU'RE DOING .

Ответить
@heinhtet7292
@heinhtet7292 - 27.08.2022 07:48

Thanks so much, it's explain a lot about JS Classes.

Ответить
@evgenboychuk8962
@evgenboychuk8962 - 28.12.2022 01:42

Clear to me, thanks Steve!

Ответить
@tharindumadhushan7776
@tharindumadhushan7776 - 08.03.2023 09:11

Well explained

Ответить
@AvionicsDev
@AvionicsDev - 02.05.2023 10:53

Nice Explaination.

Ответить
@kosnowman
@kosnowman - 22.05.2023 15:20

You are the Corey M Schafer of JavaScript, simply great!

Ответить