Type System

Why do we need types?

Intro to TypeScript

So, TypeScript is basically JavaScript plus a Type System with static typing and type checking. What does that mean?

Static Type Checking determines if there's an error on the code based on the types involved, helping you prevent bugs.

JavaScript provides dynamic typing, which means types are evaluated at runtime (when the code is executed).

Statically-typed languages do this on compile-time, meaning you can see and fix the errors while you're writing the code. This helps you detect bugs earlier and avoid them.

Try the example! 💻

Run both examples and experience the difference by yourself.

Loading...
Loading...