DEV Community

Discussion on: JS / TS?

Collapse
 
joelbonetr profile image
JoelBonetR 🥇 • Edited

Depending on the market place you want to be in.
JavaScript is a must and essential while Typescript is optional. Meaning you can build a react or angular App usign typescript or JavaScript, but you'll need plain JavaScript for adding some functionality to non-SPA websites/webapps or for using Svelte or other frameworks (don't know if it currently supports TS).

Appart from that, TS is a JavaScript superset, this means it uses the full JS api while adding some extra features.

My advice would be to learn JavaScript first then put your hands into TS.

When you are used to JS messes you will apply your knowledge on other languages to avoid this "issues" so you'll be more close to TS, then the switch from JavaScript to typescript will be smooth.

The competitor that raises against JS is web assembly. You cannot compile JS into WA (for obvious reasons, ask if you want more details) so JS is out of the equation, you can use Rust, Kotlin or many other languages to compile to WA.