split arrow functions

This commit is contained in:
Ilya Kantor 2019-11-06 14:05:43 +03:00
parent 7c8508c478
commit 6165a9a727
6 changed files with 110 additions and 109 deletions

View file

@ -0,0 +1,17 @@
```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?