DEV Community

Charity Parks
Charity Parks

Posted on

Why JavaScript?

As a web developer, we have our favorite programming languages that we use for our web applications. Mine is JavaScript! In this post I'm going to share some of the reasons why.

  1. JavaScript is the most popular language and is the foundation for todays web applications.

  2. JavaScript initially was used as a front-end interpreted language. When Node.js (a JavaScript runtime environment) emerged, JavaScript could be used for front-end AND back-end programming. Hence making it Full-Stack!

  3. JavaScript brings interactivity with users with features like forms, browser and HTML handling.

  4. JavaScript is faster due to being able to re-use code. Less lines of code need to be written. And to add to that, it offers a higher level of abstraction, meaning the developer can achieve the same functionality with less lines of code.

  5. JavaScript has turned web browsers into single page applications (SAP).

  6. JavaScript is easy to learn and easy to read.

These are just a handful of reasons to use JavaScript. I'm sure if you look into it further you will see many more reasons to give JavaScript a try!

Happy Coding!

Top comments (2)

Collapse
 
martinromario55 profile image
Martin Romario Ntuwa

Great points, but not exact facts.
JavaScript is currently the only client-side programming language, so it has no competition there.
Nowadays, CSS can also bring interactivity to the web page with transform, animation, hover, etc.
JavaScript is not easy to learn. Unless if you mean understanding the concept, and that's all. Beginners and even pro coders from other languages find JavaScript frustrating sometimes, like I've a friend of mine who codes in python, and doesn't like how JS is structured with brackets. Just like mastering any other language, it may take you several years to master JavaScript plus all its emerging technologies. Talking about technologies, you'll find a huge debate online on which JS technologies to use, which is better, which is more popular, so be on the lookout.

JavaScript is just like any other programming language. It may not be rocket science, but it's not a Cinderella story either.

Collapse
 
thumbone profile image
Bernd Wechner • Edited

"JavaScript is faster ... it offers a higher level of abstraction" - faster than what? higher than what?

Are there alternatives? I mean if you are writing a web page can you even avoid Javascript? I'd have thought the only real question is, whether or not to use it server side with Node.js or not.

That said, I admit I belong to that ilk of folk (and we are not few) that dislikes Javascript. It's getting better and ES6 was a shot in the arm that has made it much nicer to use as has the convergence of support across all the browsers. But it remains a fiddly bothersome language for some of us.