Things I Wish I Knew Before Relearning JavaScript
A. Moreno

A. Moreno @amoreno

About: Front-end developer who likes to test new technologies and fixing code to perfection. Newbie in modern frameworks but expert in legacy stuff. 🇲🇽

Joined:
May 24, 2025

Things I Wish I Knew Before Relearning JavaScript

Publish Date: May 24
11 6

Coming back to JavaScript after a few months away has been a wild ride. So much has changed—new syntax, new patterns, new "best practices." If you're in the same boat, or even just curious how modern JavaScript looks in 2025, here are a few things I really wish I had known before diving back in.


1. Modern JavaScript Is Cleaner — But Not Simpler

Between ES6+ and the latest features, JavaScript reads a lot cleaner now. But that doesn't mean it's easier to understand at first glance.

const userName = user?.profile?.name ?? "Anonymous";
Enter fullscreen mode Exit fullscreen mode

That line would have blown my mind a few years ago.It’s using:

  • Optional chaining (?.) – avoids errors if something is undefined or null

  • Nullish coalescing (??) – returns a fallback only if the left side is null or undefined

These patterns are everywhere now—worth learning early.

2. Arrow Functions Are Great (But Can Be Confusing)

Arrow functions (=>) are everywhere, but they do behave differently from traditional functions—especially with this.

const greet = () => {
  console.log("Hello!");
};
Enter fullscreen mode Exit fullscreen mode

They're shorter, great for callbacks, and they don’t bind their own this. But that also means using them in classes or object methods can lead to weird behavior if you're not careful.

3. const and let > var

Forget var. It’s still technically valid, but most modern code uses const and let.

  • Use const for variables that won’t be reassigned.

  • Use let if the value will change.

  • Avoid var unless you're maintaining legacy code.

  1. Async/Await Makes Life Easier

No more promise chains that turn into spaghetti. async/await makes asynchronous code look synchronous, which is a huge win for readability.

async function fetchUser() {
  const response = await fetch('/api/user');
  const data = await response.json();
  return data;
}
Enter fullscreen mode Exit fullscreen mode

Just remember: you can only use await inside an async function.

5. Modules Are the New Norm

Everything’s modular now. You’ll often see import and export used to break code into reusable pieces.

// math.js
export function add(a, b) {
  return a + b;
}
Enter fullscreen mode Exit fullscreen mode

Final Thoughts

Relearning JavaScript in 2025 isn’t just about brushing up on syntax. It’s about shifting your mindset. The language has matured a lot, and once you embrace the newer patterns, things get a lot more enjoyable.
So don’t get discouraged if things feel unfamiliar—modern JS is powerful, and once it clicks, you’ll wonder how you ever lived without it.

What tripped you up when you came back to JavaScript? Let me know!

Comments 6 total

  • Saint Thomas Brown ♟
    Saint Thomas Brown ♟May 24, 2025

    Thanks for this post, I've always been interested in learning JS after I try my luck with C++. Definitely keeping this mind when the time comes. Cheers!

    • A. Moreno
      A. MorenoMay 24, 2025

      Hey that's great! good luck!

  • Nathan Tarbert
    Nathan TarbertMay 24, 2025

    pretty cool seeing you break this down tbh-i always end up lost on the whole async/await vibe when i jump back in, you ever feel like too much change actually makes you slower at first?

    • A. Moreno
      A. MorenoMay 24, 2025

      Yes! I totally get you.

  • Nevo David
    Nevo DavidMay 25, 2025

    Growth like this is always nice to see. Kinda makes me wonder - what keeps stuff going long-term? Like, beyond just the early hype?

  • Dotallio
    DotallioMay 25, 2025

    Totally felt that whiplash when I saw optional chaining for the first time - thought my code was broken! Did destructuring ever throw you off too?

Add comment