DEV Community

Sherry Day
Sherry Day

Posted on

What was your greatest "aha" moment as a JavaScript developer?

Top comments (23)

Collapse
 
eljayadobe profile image
Eljay-Adobe

JavaScript was designed to be small snippets of glue code to handle DOM events. It was not designed to be for large applications.

The contenders for The Language of the Internet were Macromedia/Adobe Flash, Sun/Oracle Java, and Microsoft Silverlight. No one suspected that JavaScript would overtake all of those well-funded behemoths and rise the victor. Yet JavaScript persisted, and ultimately prevailed.

So whenever I get angry that JavaScript seems to do something stupid, I am reminded of its humble beginnings, and that it served the domain it was designed for very well.

Collapse
 
harshadpk profile image
Harshad pk

function print(str){
console.log(str)
}

Collapse
 
chriscosentino profile image
ChrisCosentino

const { log } = console;

Collapse
 
jkhaui profile image
Jordy Lee

Lmao wow, I can't believe in all these years it never occurred to me once to destructure the console

Thread Thread
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

Doing so might void your warranty though 😝

Collapse
 
rgthree profile image
Regis Gaughan, III • Edited

About 16 years ago when I firmly understood scope, closures, and this.

Collapse
 
ben profile image
Ben Halpern

So much this

Collapse
 
ben profile image
Ben Halpern

Specifically on the JavaScript front, I really think that the initial introduction of React Native really helped me understand what React meant in general to the JS ecosystem.

Since then lots of stuff riffed off of React, but at the time it was really a new thing. Specifically React Native helped close the mental gap for me. I think it helped step me further away to see the pattern for what it was instead of trying to micro-compare it to Angular, etc.

Collapse
 
liviufromendtest profile image
Liviu Lupei

When I understood that a browser is so much more than a JavaScript interpreter.
It's crazy how different things can behave in Safari.
And things look and work differently even in Chrome on Windows vs. Chrome on MacOS.

Collapse
 
offcorner profile image
OffCorner Developer

svelte in combination with tailwind, storybook and google firebase really changed the way i am working on my current project. While it is quite tricky to integrate storybook and mock firebase I am looking for solutions and might come up with a framework of sorts…

Collapse
 
sherrydays profile image
Sherry Day

What about Google Firebase was the most "aha"?

Collapse
 
lexlohr profile image
Alex Lohr

There was a point about 20 years ago, when I finally understood the underlying concepts (RegExp was suddenly fun, I soon started to overuse them, but that's a different story).

However, since then, I had a fair share of great "aha" moments, e.g. when finally understanding react fibers after reading the source code or after listening to Ryan Carniato talk about reactivity in Solid.js (his understanding of the topic is deeper than anyone's I've ever met).

Collapse
 
colinkiama profile image
Colin Kiama

Finding out how this works. Very eye-opening.

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

Figuring out the whole callback/promise/async tower of abstractions sure was a bit of an AHA! moment, but not of the good kind.

To this day I am convinced callbacks and the many attempts to make them more usable are an inferior mechanism for handling asynchronicity in code.

Collapse
 
antonmelnyk profile image
Anton Melnyk

That functions and closures are core elements of the language. You can assign functions to variables, return them from other functions, pass to other functions as parameters and thanks to closures do easy currying.

This opens amazing possibilities for functional programming. Having some experience with ramda.js and crocks.js, I am fairly positive THIS is the power of the language. Sadly, not all of the devs get it and try to write ‘this’, classes and do monstrosity like Angular. Even React is not yet utilising full power it could utilise.