DEV Community

Discussion on: What problem does Typescript solve ?

Collapse
ricardopaul profile image
Ricardo Paul Author

Hey vladi, thank you for your comment. When I say 'the first line of code would work' I refer to the line message.length, because message is declared as a string, the line would actually return message length as opposed to the second line which would fail by trying to call message