Course · Section 16: Asynchronous JavaScript: Promises, Async/Await, and AJAX · Lecture 275: Error Handling With try...catch
Implement `checkAge(age)` returning `ok` when `age` is between 0 and 120 inclusive, otherwise `invalid`. Use a thrown error and a catch internally.
+ 1 hidden test run on Submit.
Validation via thrown errors and a catch maps in-range ages to 'ok' and the rest to 'invalid'.
Run your code to see results.