TypeScript Tutorial
TypeScript is JavaScript with added syntax for types.
Start learning TypeScript now »Examples in Each Chapter
Our "Try it Yourself" editor makes it easy to learn TypeScript.
You can edit TypeScript code and view the result in your browser.
Click on the "Try it Yourself" button to see how it works.
We recommend reading this tutorial in the sequence listed in the left menu.
TypeScript Exercises
My Learning
Track your progress with the free "My Learning" program here at W3Schools.
Log in to your account, and start earning points!
This is an optional feature. You can study at W3Schools without using My Learning.
Interesting facts about TypeScript
- TypeScript is not "the best JavaScript", but a superset of it. This means that TypeScript includes all of JavaScript, with its pros and cons. TypeScript adds a type system to it that helps you write code that's easier to read, less error-prone, and better organized.
- TypeScript is used in many popular projects. For example, Angular, React Native, Babel, Jest, and many others. This shows that TypeScript is a language that is in demand in the real world.
- TypeScript can help you understand JavaScript better. TypeScript's type system forces you to clearly describe what your code does. This can help you better understand how JavaScript works and how to write better code.
- TypeScript has a large and active community. This means that you can find a lot of information about TypeScript on the web, and get help if you run into difficulties.
- TypeScript is a language that is constantly evolving. It is regularly updated with new features and improvements. This means that TypeScript is a language with a future.
- TypeScript is a language that can help you in your career. Many companies are looking for developers who know TypeScript. Learning TypeScript can give you a competitive edge in the job market.
- TypeScript is a language that can be exciting! Many people believe that TypeScript is a more enjoyable programming language than JavaScript.
- TypeScript is a language that can help you become a better programmer. Learning TypeScript can help you develop your programming skills and become a more proficient developer.
If you want to learn TypeScript, here are some resources to get you started:
- The official TypeScript site: typescriptlang.org
- TypeScript Handbook: typescriptlang.org/docs/handbook
- TypeScript Playground: typescriptlang.org/play
- TypeScript courses: udemy.com/topic/typescript