$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · medium · #201

Fill the blank

// signal a failure to the caller
if (!ok) {
  ____ new Error('failed');
}

Answer: throw (also accepted: throw, throw())

throw raises the error for the nearest catch.
Play Problem Solving ▸