try {
  let hello = prompt("Type hello");
  if (hello !== 'hello'){
    throw new Error("Oops, you didn't type hello");
  }
}
catch(e) {
  alert(e.message);
}
finally {
  alert('thanks for playing!');
}