DEV Community

Cover image for JS vs. TS: Should you use JavaScript or TypeScript?
Momcilo
Momcilo

Posted on • Originally published at thebcms.com

JS vs. TS: Should you use JavaScript or TypeScript?

JS vs. TS: Should you use JavaScript or TypeScript?
"Should I learn JavaScript or TypeScript?"- is a million-dollar question, and it seems that there are a lot of different answers and opinions about it

"Should I learn JavaScript or TypeScript?"- is a million-dollar question, and it seems that there are a lot of different answers and opinions about it

What is JavaScript?
It's a scripting language that helps you make interactive web pages. JavaScript runs in the user's web browser without requiring web server resources. It follows the rules of client-side programming.

What is TypeScript?
TypeScript is a superset of JavaScript, which means that TypeScript is an "upgraded" version of JS. The language is statically compiled into JavaScript code. Typescript could be run on any browser if you converted it into JavaScript.

Why is there a battle?

  • JavaScript was originally designed for client-side programming.
  • Due to JavaScript's popularity, developers also realized it could be used for server-side programming.
  • As the project grew, the JavaScript code became increasingly complex.
  • Large-scale applications were unable to use JavaScript because of this limitation.
  • It was for these reasons that JavaScript was not successful as a server-side technology in the enterprise.
  • For this reason, TypeScript was created.

JavaScript VS TypeScript: Which is better?
Well, the answer to this question is a bit more complicated, so if you want to find an answer, take a look at my blog, where you can find the whole text about this epic battle called: JS vs TS.

Top comments (0)