Deep JavaScript Foundations, v3

Course Overview

Kyle Simpson

Kyle Simpson

You Don't Know JS
Deep JavaScript Foundations, v3

Check out a free preview of the full Deep JavaScript Foundations, v3 course

The "Course Overview" Lesson is part of the full, Deep JavaScript Foundations, v3 course featured in this preview video. Here's what you'd learn in this lesson:

Kyle breaks down JavaScript into three main pillars which will be covered during the course.

Preview
Close

Transcript from the "Course Overview" Lesson

[00:00:00]
>> Kyle Simpson: I believe JavaScript can be divided into three cores, three pillars if you will. And those three pillars are absolutely critical for all of the JavaScript coding that you will ever do, even if it has the brand name React or the brand name Vue.js or the brand Angular.

[00:00:18]
Guess what? Or even for the old school folks like me, even if it's jQuery it's still JavaScript, okay? And those things are still based upon the same fundamental pillars. And I see developers all the time, winding themselves and contorting themselves around all kinds of certain weirdness within their particular framework or utility whatever it is they're working on.

[00:00:41]
And it turns out it's they don't understand one of the pillars, or some part of one of these pillars. And this course aims to fix that. I have this crazy notion that if for whatever reason you've chosen you to make your career be a JavaScript developer, if you've chosen to get paid to write JavaScript, you oughta understand your tool.

[00:01:04]
So what are we going to look at those three pillar? The first of those pillars may be the least popular of them actually definitely the least popular of them, nobody likes to talk about types and especially within a dynamically typed language like JavaScript, this is one of those taboo topics.

[00:01:19]
If you follow a Doug Crockford, he tells you don't use any of this stuff don't think about any of these things of course, that isn’t actually practical. And we're gonna talk about why you should care about types. But I will just go ahead and spill the beans here.

[00:01:37]
The takeaway from this particular core for this particular unit is, it is irresponsible of you to write code and not understand this critical fact of the language, okay? It is irresponsible to say, well, some good parts told me to just avoid that topic, don't learn it, don't need to worry about it.

[00:01:57]
That is one of the big reasons why people produce bugs in their code. They write code and they don't understand the code that they're writing, okay? So we're gonna cover the types and specifically the coercion system. Now, I'm gonna ask to have an open mind on it because I know you have been so programmed to think that we don't need to do these things, we should only just use the triple equals, and who needs to care about it if we use the triple equals?

[00:02:19]
That is just not a practical way of writing JavaScript. You've been getting by, and it's not effective. So I'm gonna ask you to have an open mind when I tell you, and maybe more so than I have ever before, I'm gonna have a very strong, I'm gonna firmly plant my foot in a position here about what you should be doing with coercion, what you should be doing with JavaScript's type system.

[00:02:42]
In the past I've sort of have views that were kind of like well just make your own sorts of decisions but I have come to believe, my views have shifted and I have to come believe there is a correct way to think about this and we're not getting there yet.

[00:02:54]
We're not there yet as a community. So maybe one of the most important things we can do in this course is enlighten you to why that's so important okay? The second core unit that we're going to talk about is the scope system. Lexical scopes which leads us into discussions about closure and eventually the modular pattern.

[00:03:12]
This is a critical pillar of the language. Almost everything else is built upon it. And the third of the pillars is the objects system. I like to refer to this as the objects oriented, a little bit different than object oriented, which is actually class oriented. We need to understand how JavaScript's objects system works, which includes the this keyword, that completely befuddling thing that's actually very straightforward once you've been taught what it does.

[00:03:39]
Once you disconnect from what it does in other languages and you learn what it does in JavaScript, it's very straightforward. So it's important for us to understand all three of these cores. And when we dig into this and then we dig into the prototypes, you have to understand that stuff before you can understand somebody layering on top a syntactic sugar like the class keyword.

[00:04:01]
I have not hidden my thoughts and options online about the class keyword and I will tell you again I firmly believe that it should not be used in JavaScript. But there is a difference between me saying, you shouldn't use it and me saying you shouldn't learn it. You absolutely should learn this system.

[00:04:20]
You absolutely must learn this pillar to understand why that particular coding style doesn't fit with JavaScript and to understand, by the way, if you are forced to do it, how to do so well, if that framework makes that choice for you and many of them have. Can you still be effective or you're simply gonna be coding with blinders on?

[00:04:43]
So these are the three core pillars of the JavaScript language and largely all of these pillars were in place at the end of the 10 day prototyping session that Brenda and I put back in in 1995. This is largely the JavaScript that we've had now for 24 years.

[00:05:01]
Yes, there are definitely different details. But many of these things are as core and root of a foundation as it gets in the language. At the end of this course which will cover over a period of about two days, it's going to feel a lot more like we just went over five or ten days worth of material because it's extremely compressed.

[00:05:21]
So I don't mean for you to come at the end of this course and say, aha I'm certified, I know everything there is to know about JavaScript, this is not the end but the beginning of what for me has been over a 20 year journey to understand JavaScript.

[00:05:34]
And I'm documenting for you what I've figured out about the map. I've tried to put together a treasure map for my journey. And I'm documenting that for you, that's also what the books are. So use those as companions here.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now