TypeScript vs JavaScript in 2024 - Difference EXPLAINED

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
my name is Daniel and in this video we will explore both typescript and JavaScript and figure out how they are different from each other together during this video we will find out the purpose of these programming languages we will talk about the main difference between JavaScript and typescript we will explore the pros and cons of typescript compared to JS and finally find out which of these languages is more relevant today and shows more promise ready let's go what typescript and JavaScript are made for alright before I even start comparing the two languages it's important to understand what they were made for this can help you understand what they are like and their advantages JavaScript JavaScript started as a very simple language over time it turned into a powerful programming language that can create a variety of things I would say it's a programming language you can easily learn but it can take several years to become really good at it many web developers use JavaScript to make web pages apps servers and games more interactive it goes well with HTML and CSS helping to make web elements look good and allow users to interact with them which CSS can do on its own since JavaScript is used in lots of different things like websites mobile apps and games learning it can be really useful typescript typescript is a superset of JavaScript it has all the things JavaScript can do plus some additional features when you quote in typescript it gets turned into JavaScript that web browsers can use typescript also adds something called type safety to JavaScript it's an open source programming language so anyone can contribute to its Improvement think of typescript as an upgraded version of JavaScript that makes developers lives easier it helps them add type safety to their projects and it brings along a bunch of other cool features like interfaces type aliases abstract classes and more main differences between typescript and JavaScript alright fellow developer sounds like both languages are pretty similar doesn't it so what's the main difference between them well JavaScript is a dynamic programming language while typescript is aesthetic and it's the main thing that differs one from another JavaScript is dynamically typed while typescript is a set technically type upgraded version of JS this means it allows both strict static typing and dynamic typing this makes typescript code safer but it can also be a bit more challenging to write so the language you pick depends on your project and the style of quote you prefer to use however the difference between these two languages don't stop there here are some other things that make them different JavaScript is a scripting language used to make web pages interactive while typescript is an expanded version of JavaScript typescript code requires compilation and JavaScript code doesn't typescript supports prototyping while JavaScript doesn't in typescript you use scenes like types and interfaces to explain the data you are working with but in JavaScript there is no such concept typescript offers a robust time system with features like generics and JavaScript capabilities making it well suited for large projects on the other hand JavaScript is a great choice for smaller projects and finally JavaScript is an easy language to learn while typescript has a bit more complicated learning curve and requires prior knowledge of scripting advantages of typescript over JavaScript guys before we move on I try to make educational content in an entertaining way make it fun instead of boring in return please like this video And subscribe to my Channel if you enjoy my content all right it folks might ask what is so special about typescript what can make developers choose it over.js in fact there are a few distinctive advantages of using typescript over JavaScript first of all typescript identifies compilation errors during development that is before code runs this reduces the chances of runtime errors in contrast JavaScript is an interpreted language secondly typescript offers static or strong typing this means it allows type correctness checks during compilation and that sounds in JavaScript cannot do and finally typescript is essentially JavaScript with extra features including those from es6 while these features might not be supported by your chosen web browser the typescript compiler can convert TS files into ES3 ES4 and es5 versus Z are compatible disadvantages of typescript but even despite all its great features typescript isn't perfect you're not perfect I'm not perfect because there is a number of things about it that might annoy developers first of all 20s file compilation happens typescript requires an extra step and this extra step can be seen as an inconvenience for developers and this is why many of them prefer to avoid working with typescript another important disadvantage is that learning typescript is more challenging compared to JavaScript typestrip demands more scripting expertise besides many developers prefer mastering JavaScript first before working with typescript and in my opinion this is a smart way to learn typescript and finally for programmers typescript can be a bit frustrating when it comes to setting up things one of the main downsides is that you have to write a lot of things by hands unlike JavaScript where you have less code to write and more freedom typescript can feel a bit hard and unflexible in comparison why use typescript when JS is available so after you consider all these pros and cons you might have a question I myself had at some point if there is Javascript and it's so popular and widespread why use typescript then you see when JavaScript first came into Bane the folks who made it through of it as a language for making things happen on the client side but over time they saw that it could also do some stuff on the server side however as people use JavaScript more and more they noticed that it was getting a bit complicated it couldn't do ever since that a full-fledged object-oriented programming language should do that's why this made it hard for JavaScript to be a Top Choice for big business projects as a server side tool and that's why the developers came up with typescript to fix these gaps and make JavaScript more suitable for big projects and really big projects I mean Enterprise level projects so typescript or JavaScript Technologies including programming languages change every day so which one should you choose as a developer who keeps up with the times here is the thing guys decide in which language is better or which one to use is entirely up to you and depends on the task or project you have to build JavaScript is a fundamental scripting language that remains a topic for many developers because it's versatile has lots of features and a big Community it's great for small and middle sized projects like making interactive websites now if you have a big project with lots of code typescript can be a smarter Choice it's a newer language with object-oriented programming features generics and good support from development tools it's designed for complicated projects and can provide what JavaScript just couldn't that's why it's only up to you to decide which ones use your project better career opportunities people I will tell you right away a qualified JavaScript typescript developer won't face any problems looking for a job because JavaScript was invented to make early websites more interactive it's been getting more and more popular ever since today it's the most Wanted programming language out there plus typescript which is like a Spartan version of JavaScript is also becoming popular typescript has been getting more attention recently and some new JavaScript tools like angular and sjs are made using typescript too and according to data JavaScript engineers in the United States earn 120 000 per year on average at the same time those who know typescript can learn as much as 135 000 per year so as you can see there is a difference between JS and GS salaries but it's not a big one so guys that's all about typescript javascripts and their differences I also attach Learning Materials related to these programming languages in the description down below let me know what you think about this languages feel free to share your experience in the comments don't forget to like this video if you enjoy my content and subscribe if you want to see more videos like this think about it until next time foreign [Music]
Info
Channel: Daniel Dan | Tech & Data
Views: 28,515
Rating: undefined out of 5
Keywords: javascript vs typescript, typescript vs javascript differences, difference between typescript and javascript, typescript comparison javascript, typescript vs javascript, ts vs js, js vs ts, typescript vs javascript 2024
Id: HCXPJmtV47I
Channel Id: undefined
Length: 8min 55sec (535 seconds)
Published: Tue Sep 19 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.