Check out a free preview of the full Getting Started with JavaScript, v2 course

The "Introduction" Lesson is part of the full, Getting Started with JavaScript, v2 course featured in this preview video. Here's what you'd learn in this lesson:

Kyle Simpson introduces the course on beginning to program in JavaScript and demonstrates several basic parts of a program working together.


Transcript from the "Introduction" Lesson

>> Kyle Simpson: Hello and welcome. This is Getting Into JavaScript. I'm Kyle Simpson. A lot of you I know and either know online or in person. So if you find me online, you can always look for Getify, that's my Gmail address, my Twitter, my GitHub. There's lots of places to find me online.

So any time that you are going through this course, or afterwards, reviewing things, feel free to find me online under Getify, and reach out with any feedback, questions. I love getting to help people learn about JavaScript. This is what I do for a living, I just travel all over and teach this kind of stuff.

And it's a particular joy to teach this exact course because getting into JavaScript is really the bootstrapping, if you will. It's the first steps for some of you, maybe never having done any programming at all. And that's really exciting to see because we know that a couple of years from now you'll be mid and senior level developers at at an amazing jobs.

And it's cool to be part of this first initial steps. So I'm excited to jump into that journey with you. Let's dive in and let's start talking about JavaScript. We'll first actually look at programming and then programming specifically in the context of JavaScript. As a companion to go along with this course, I wanna point out one of the books that I've written.

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.

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?

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.

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.

Chapter one is all about I've never programmed before and Chapter 2 is all about, have done some programming before. I understand if statements and for loops, but I've never really done anything with JavaScript. What do I need to know to really get up and going with JavaScript? That's what chapter two is all about.

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.

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.

The most common thing that people talk about when they talk about starting a new programming language or starting the idea of programming or maybe a new framework or a new tool is the Hello World. How do I make it say Hello World? And I wanted to give you just a quick glimpse of a sort of Hello Worldish kind of JavaScript program.

Obviously it doesn't literally say Hello World. But it's just a quick glimpse, and by the end of our discussion today you should be fully and completely confident in this sort of code, being able to write this sort of thing for yourself in JavaScript. So we have a couple of things that are starting off right at the beginning.

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.

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.

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.

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.

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.

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.

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.

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