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 @@
|
|||
|
||||
# Rewrite with arrow functions
|
||||
|
||||
Replace Function Expressions with arrow functions in the code below:
|
||||
|
||||
```js run
|
||||
function ask(question, yes, no) {
|
||||
if (confirm(question)) yes()
|
||||
else no();
|
||||
}
|
||||
|
||||
ask(
|
||||
"Do you agree?",
|
||||
function() { alert("You agreed."); },
|
||||
function() { alert("You canceled the execution."); }
|
||||
);
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue