Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's this keyword called "var"


`let` and `const` are transpiled by Typescript/babel to `var`.


The point is you can put var inside the try because it has function scope. That's what I do, although it is inelegant.


Only if the target is ES3 or ES5.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: