Transcript from the "Introduction" Lesson
[00:01:24] This is in the You Don't Know JS book series, and many of you know about that series. You can read the entire six-book series for free online, and there's a link to the GitHub repo here in the slides. But they've also been published officially as regular books. So you can find those any place that you buy books online like Amazon and so forth.
[00:01:42] But the first book of that series is called Up and Going. And I wanted to just sort of frame that book. So the first chapter of that book is about I've never done any programming before. What is a program, what is a line of code, what is a statement?
[00:01:56] And if you're in that boat, that's exactly where chapter one was written for you. And the first part of our discussion today will kinda quickly review some of those basic concepts, just in case any of you have maybe never heard some of those words like statements or expressions before.
[00:02:11] But this book should be seen as a companion to this course to help you sort of as a roadmap go into more detail on any of these topics. So if we say something, if we move a little too quick on something, make sure you dive back into the book.
[00:02:41] It goes into all the things that we'll cover today, but in much more detail. So look through chapter two. And then finally, chapter three of this book, that's it, it's only three chapters, 70 or 80 pages long. But chapter three of the book is all about orienting you to where to look for more information throughout the rest of the series.
[00:02:58] So it covers or it highlights and overviews each one of the things that all the other five books in this series focus on. So I definitely encourage you to go and either read online for free or pick up a copy of this book and use this as your companion guide as we go throughout the course.
[00:03:52] We've got a variable called teacher and another one called twitterHandle and another one called age. And then we have this thing called a function. The function whoAmI that takes some inputs, those are called parameters. You see on line 6 a console.log, that's how we print things to the developer console.
[00:04:09] And then down on line 12, the whoAmI, that reference is actually calling the function. So if any of those things that I just said in the last 20 seconds were like, wait, calling a function, what does that mean? Don't worry, we're gonna get into all of those things.
[00:04:23] So this is the kind of code that we want to be able to dive into and be totally confident on so that it's our foundation for exploring the rest of the language. So that's our motivation for this course that we're going to dive into today. But before we move on, let's actually see that code running.
[00:04:39] I've got that code loaded up in a run JS environment this is one of my favorite ones. You can, of course, also use something like a Chrome console, the developer console, or even use on the command line something like Node.js. But I'm gonna run this code. You'll notice I have the teacher, twitterHandle, age, the function.
[00:04:56] I'm gonna run this code and we'll see the output here on the right. You'll notice that it has printed out a string. Hi, I'm Kyle, aka getify, and I'm 39 years old. Now, if I had done this workshop a few months ago, back before my most recent birthday, and I was 38, if we change that value and we rerun it.
[00:05:14] You'll notice that the value changed. Or if I, for some reason or another, decided to change my Twitter handle to theGetify, then we could change that value. And now you see that the value changing every time we run it. So that's an example of the kinds of things that you're gonna wanna play with as you go throughout this course.
[00:05:33] You're gonna wanna try the code, but it's most important that you write the code and then run it. So make sure you're familiar with one of these environments where you can execute the code and see those results hands-on for yourself.