Introduction to JavaScript

Build dynamic websites with the programming language of the web.

StartJavaScript Illustration
Chevron Left Icon
Introduction to JavaScript
Lesson 1 of 2
Chevron Right Icon
  1. 1

    Welcome to Learn JavaScript! JavaScript is the most widely used programming language on the web and is used on most websites, including this one. By the end of this course, you'll have a strong...

  2. 2

    The building blocks of JavaScript make up every program and line of JavaScript. Just like a language has nouns, verbs, and prepositions, JavaScript has its own building blocks. Instead of calli...

  3. 3

    We can't do much programming with our knowledge of types right now, so let's build something cool. Let's learn how to ask JavaScript to talk to us. To do this, we need two things: 1. A way to ask...

  4. 4

    Don't worry, math does not need to be your strong-suit to learn JavaScript. There are just a few operations we'll need to know to make some awesome programs later in the course!). JavaScript inclu...

  5. 5

    Now let's generate a space fact while we learn a brand new operator called – drum roll please – the modulus. The idea behind the modulus is to show you the remainder after you divide a number. ...

  6. 6

    As it turns out, JavaScript has some tricks up its sleeve to make our lives easier. JavaScript has built in functions, which help us do everyday things. We'll learn more about functions later in t...

  7. 7

    As we write JavaScript, we can create comments in our code. Comments are lines that are not evaluated when the code runs. They exist just for human readers, in other words. Comments can be extrem...

  8. 8

    Let's take one more glance at the concepts we just learned: - There are three essential data types in JavaScript: strings, numbers, and booleans. - We can write out anything to the console with ...

  1. 1

    To write programs in JavaScript, we'll need to make our code reusable. Part of making code reusable is removing the data we want to perform some logic on to leave only the logic. Then we can use ...

  2. 2

    Let's dive in and see a variable in the wild. Here is how you declare a variable: [...] You can almost read it aloud: "Variable myName is equal to Arya." Let's dissect that statement and look ...

  3. 3

    If variables can hold strings, can they hold other data types? Let's give it a shot: [...] Variables can hold any data type, like strings, numbers, and Booleans. They can also hold data types t...

  4. 4

    Why do we care about variables? Variables are useful in two ways: 1. They allow us to use the same value over and over, without having to write a string or other data type over and over. 2. More ...

  5. 5

    In the previous lessons, we've put strings into variables. Now, let's put a variable's value into a string! Putting a variable in a string uses concepts we've already learned. The JavaScript term ...

  6. 6

    You made it to the end of the first unit and this lesson! High five! We learned: - How to create variables. - How to change a variable's value. - How to interpolate, or insert, a variable int...

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo

Introduction to JavaScript

StartJavaScript Illustration