Why type check?
These are a collection of simple examples to explain why type checking JavaScript is useful and important.
Date returns a string
Calling Date() in JavaScript returns a string. In the code below, there is a subtle error which would
have been difficult to spot with regular JavaScript.
Loading TypeScript...