en.javascript.info/1-js/02-first-steps/15-function-expressions-arrows/1-rewrite-arrow/solution.md
Ilya Kantor 0fcf9f84fa fixes
2017-03-24 17:28:37 +03:00

238 B

function ask(question, yes, no) {
  if (confirm(question)) yes()
  else no();
}

ask(
  "Do you agree?",
*!*
  () => alert("You agreed."),
  () => alert("You canceled the execution.")
*/!*
);

Looks short and clean, right?