Hacker News new | ask | show | jobs
by nuancebydefault 672 days ago
My apologies, I thought it was C++. I should learn typescript, it is one of those I'm postponing.
1 comments

Nothing in that snippet is Typescript-specific, it's just plain Javascript.

All syntactically valid Javascript is also syntactically valid Typescript, it just adds stuff, though you can get runtime errors for things like reassigning variables in a way Javascript is fine with that Typescript disallows.