JS try-catch-finally

PHOTO EMBED

Fri Nov 27 2020 10:24:35 GMT+0000 (Coordinated Universal Time)

Saved by @goranbloncar

try {
  // code that we will 'try' to run
} catch(error) {
  // code to run if there are any problems
} finally {
  // run this code no matter what the previous outcomes
}
content_copyCOPY

https://medium.com/@lucymarmitchell/using-then-catch-finally-to-handle-errors-in-javascript-promises-6de92bce3afc