Using var inside try-catch block in Typescript
In my typescript project I am trying to fetch a user from database. Since it is possible that the specific user will not be found, I want to wrap the call inside a try-catch block:
Why is declaring 2 variables with const and comparing them giving me error?
This is my code in TypeScript: