In this article we are going to talk about the differences between Javascript and Typescript, they are two languages that are widely use nowadays in all types of projects, JS was the first to be introduced as client-side language. As time passed the projects were JS was being used started to be too complex and heavy, thats were TS enters the game, and starts as language to resolve all the problems that JS was having at the moment, nowadays TS is a language widely used also and is becoming bigger and bigger, so I hope that with this article I can help you a little bit to now any differences or to resolve any doubts.
There are many differences, now I'm going to show you a comprehensible list of differences.
Differences
- JS is used for client-side mostly while TS is used mostly for both client-side and server-side.
- TS has an improved readability, since JS requires a lot of manual detection of bugs and errors, this has been improved a lot by TS.
- TS has static typing while JS doesn't support it since JS is a dynamically-typed language.
- TS supports ES6.
- TS has a full support in modern IDE.
- TS can also convert its code to JS if necessary.
- Using TS means that you can use OOP(Object-oriented programming) principles.
- In JS functions are considered an object and they can have its own method and properties.
Conclusion
The choice is up to you at the end on what to choose if you want to work with this languages, you will have to balance the pros and the cons between both of them, and make an educated choice. Usually the option you choose will come from different variables like having in mind the size and complexity of the project you are going to work on, there are more differences between this two languages but the ones I wrote are the main ones and the important ones, I hope you like the article, any queries feel free to comment and ask!
Top comments (1)
Typescript is highly addictive 🤓