Essential CSS
JavaScript Roadmap
Learn JavaScript
Mastering Web Typography
Practical Astro
Understanding Async JS
Unorthodox Tailwind
API Masterclass
Build and Deploy
The Beginner Freelancer
Real World Node
Profile Billing Logout

The Baby Phase

4m:11s

You’re in the Baby Phase if you’re just starting out.

Here, you’re clueless about JavaScript. You don’t understand the syntax at all.

You should focus on two things:

  • Figuring out what JavaScript is good for
  • Familiarize yourself with JavaScript’s syntax.

Today we’re going to cover what to do in the Baby phase.

Note

If you think you’re past the Baby Phase, read through this email and see if you missed any important fundamentals.

What is JavaScript good for

JavaScript is great for interactivity. From a practical sense, we can say that JavaScript is great for changing the HTML and CSS on the fly.

I wrote an article about the difference between HTML, CSS, and JavaScript. Read through this article and you’ll have a better understanding.

Familiarizing yourself with JavaScript’s syntax

You should learn the very basics of JavaScript in this phase. Here are the things to watch out for:

  • Variables
  • Primitives (like Strings, Numbers, Booleans, Null, and Undefined)
  • Objects
  • Functions
  • If/else condition statements

Helpful resources

In Learn JavaScript, I provide you with an entire chapter of JavaScript fundamental concepts for free.

You can access this chapter here.

Stuff you need to do in this phase

As you go through these resources, I want you to focus on three things:

  1. Set up your code editor. I highly recommend Visual Studio Code if you don’t have one you’ve settled with yet. If you need help with Visual Studio Code, consult this series of videos I made a while back.
  2. Type code word for word. Many people skim through the articles and expect themselves to understand. No, you can’t. You need to put in the practice (by typing) so the knowledge starts to become part of you.
  3. Learn to debug errors. Everyone makes mistakes when writing JavaScript. When you make a mistake, you get errors. These errors tell you what’s wrong, so learn to debug these errors.

Common questions and challenges

1. How long would the baby phase take?

Depends on how much time you’re willing to commit to learning. If you’re focused, it should take you anywhere between 1 to 2 weeks.

2. How do I use the syntax stuff that I just learned?

You can find the answer in this lesson in Learn JavaScript.

3. What is this ES6 thing that people keep talking about?

ES6 is a version number for JavaScript. You can find out more about different versions of JavaScript in this lesson.

4. Why learn JavaScript, not jQuery?

Great question! jQuery is a library that’s built on top of JavaScript. It was important in the past because browsers implemented things differently (you had to write 3 - 5 versions of the same code to support all browsers).

But JavaScript between browsers is very consistent now, so you don’t need jQuery anymore. Even Bootstrap (the most popular framework out there) stopped using jQuery!

Furthermore, you’ll benefit in the long run since you can apply JavaScript concepts to any library you use in the future.

5. Why does JavaScript seem so illogical?

Every language is different. They have their idiosyncrasies. Like how English is completely different from French, JavaScript is different from other programming languages you come across (even though they may be similarities).

Instead of believing JavaScript is illogical (which creates a barrier against learning), try embracing JavaScript for what it is. If you accept the language and the quirks, you’ll learn faster since there’s less resistance.

Big list of questions to check your understanding

Try to answer every question here! If you can answer everything, you know your fundamentals are strong enough to move on.

Here we go:

  • Name the primitive values in JavaScript
  • Variables
    • What are variables?
    • Why do we need variables?
    • How do you declare variables?
    • How do you assign variables?
    • What’s the difference between const, let and var?
  • Operators
    • What does each of the following operators do?
      • +
      • -
      • *
      • /
      • %
    • What does each of the following comparison operators do?
      • ===
      • !==
      • >
      • >=
      • <
      • <=
  • Conditionals
    • What is an if statement?
    • When do you use an if statement?
    • When should you use if, else if, and else?
      • if
      • else if
      • else
    • How do you write if, else if, and else?
  • Objects
    • What is an object?
    • Why do you use objects?
    • How do you put values into objects?
    • How do you get values out of objects?
    • How do you remove a property from an object?
    • What is a method on an object?
    • How do you define methods?
    • How do you call/invoke a method?
  • Functions
    • What is a function?
    • Why do you use functions?
    • How do you define functions?
    • How do you call/invoke/execute functions?
    • How do you pass arguments into a function?
    • What does the return keyword do in a function?

That’s it!

Let’s move on to the Child Phase.