split arrow functions
This commit is contained in:
parent
7c8508c478
commit
6165a9a727
6 changed files with 110 additions and 109 deletions
|
@ -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?
|
Loading…
Add table
Add a link
Reference in a new issue