3 ms·
Something to note about the JS examples, if you throw them into TypeScript you'll get similar error messages to go vet and rustc. The first example: https://ww
by emptysea 5y ago
Something to note about the JS examples, if you throw them into TypeScript you'll get similar error messages to go vet and rustc.
The first example: https://www.typescriptlang.org/play?#code/GYVwdgxgLglg9mABMOcAUMCUiDeBYAKEUQgQGc4AbAUwDpK4BzNAIhThYBpEsBuQgL6FCoSLASIARgEMATmmz4iJclToNmLGbICELTPwJCCI8NHhIAttJhgFuQsRSzEGRAF5EABl49EAHkQAZl8YAGowxUdiZFQMA2jjYllqKBBZMENibQVDY0JrW1ygA https://www.typescriptlang.org/play?#code/GYVwdgxgLglg9mABMO...
Unreachable code detected
Along with some typos since `i` isn't declared.
- balls187 5y agoA JS Linter will also flag that line as well.
- fasterthanlime 5y ago(Author here) Absolutely! I love TypeScript and refuse to write JavaScript without it (even just in JS-checking mode with jsdoc annotations), but I'm already fighting, like, 4 different battles in that article, I didn't want to bring a fifth one into the mix.