My First Week Learning JavaScript

I started learning JavaScript seriously about a week ago, and I wanted to write down what I’ve learned while it’s still fresh.

The Confusion

The first few days were honestly confusing. I kept mixing up concepts:

  • When to use let vs const vs var
  • What undefined and null actually mean
  • Why sometimes I need parentheses and sometimes I don’t
  • What this refers to (still not 100% sure)

I also made a lot of silly mistakes:

  • Forgetting semicolons (then learning they’re optional?)
  • Mixing up = and == and ===
  • Not understanding why my code didn’t work, only to find I misspelled a variable name

The Breakthroughs

But there were also moments where things clicked:

Functions are just values: This blew my mind. You can pass functions around like any other value. You can store them in variables, pass them to other functions, return them. This is apparently called “first-class functions.”

Arrays and objects are everywhere: Almost everything in JavaScript involves arrays or objects. Once I understood how to work with them, a lot of things made more sense.

The console is your friend: console.log() everything. Seriously. I spent an hour debugging something that would have taken 2 minutes if I had just logged the values.

What I’m Building

I’ve been building small things to practice:

  • A simple calculator
  • A todo list (everyone builds one, right?)
  • A program that generates random quotes

They’re not impressive, but they’re helping me understand the basics.

Resources I’m Using

  • MDN Web Docs: This is my main reference. It’s detailed and accurate, though sometimes hard to understand.
  • YouTube: I watch tutorials from Fazt and others. Seeing someone code helps me understand better than just reading.
  • Google: Whenever I get stuck, I search for the error message or concept.

What I’m Struggling With

  • Asynchronous code: I’ve heard about callbacks, promises, and async/await, but I don’t really understand them yet.
  • The DOM: I know JavaScript can manipulate web pages, but I haven’t figured out how yet.
  • When to use which method: There are so many array methods (map, filter, reduce, forEach). I don’t know when to use each one.

What I’ve Learned About Learning

Practice matters more than reading: I can read about JavaScript all day, but I don’t really understand until I write code.

Errors are normal: At first, every error felt like failure. Now I’m starting to see them as information.

Start small: I tried to build something complex on day 2 and got overwhelmed. Small projects are better for learning.

It’s okay not to understand everything: I don’t need to master JavaScript in a week. I just need to keep making progress.

Next Steps

This week I want to:

  • Learn more about functions (arrow functions, callbacks)
  • Start manipulating the DOM
  • Build something slightly more complex

I’m excited to see where this goes. A week ago, JavaScript looked like gibberish. Now I can at least read it and understand what’s happening (most of the time).

If you’re also just starting, keep going. It gets less confusing.