en.javascript.info/1-js/02-first-steps/17-arrow-functions-basics/1-rewrite-arrow/solution.md
2021-03-15 06:48:59 +05:30

17 lines
239 B
Markdown

```js run
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?