I was asked recently on a livestream about people being against JavaScript on the web. I think it’s a hot take that… doesn’t actually exist. JavaScript is one of the building blocks of the web.
The metaphor I like to use is that web development is like a sentence. When you read a sentence, there’s nouns, adjectives, and verbs (and other things, sure, but let’s stick with this for now). In web development, HTML is the noun, CSS is the adjective that describes the noun, and JavaScript is the verb that makes it do something.
You can have websites without JavaScript, of course. They’re static and still, which is not a bad thing. It’s like the sentence:
“A quiet night under the stars.”
It’s peaceful. Nothing’s really happening. And that’s okay, and lovely, even!
But what if we changed it with just a little verb?
“A quiet night erupted under the stars.”
Whoa. It erupted. Something happened. That adds some excitement. And you can keep going, and going, and going.
“A quiet night erupted under the stars, as fireworks blazed across the sky and laughter echoed through the air.”
Just like a sentence can get more magical as you add more to it, websites can, too. We could really go deep on this metaphor talking about how you can add too much to a sentence or poorly construct it and lose the meaning, but you get the idea.
Nobody wants you to get rid of verbs, and nobody actually wants you to get rid of JavaScript. Do it the right way, and your websites can be as magical, powerful, simple, peaceful, useful, or useless as you want them to be.
Top comments (0)