JavaScript by Example: Error handling

Instead of needing to use the key words "then", "catch", and "finally", we now have a single key word "await" which we place in a try / catch block.

try {
    let value = await promise;
    console.log("value: ", value);
} catch (error) {
    console.log("error: ", error);
}