Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ function ask(question, yes, no) {
}

ask(
"Do you agree?",
"Ви згодні?",
*!*
() => alert("You agreed."),
() => alert("You canceled the execution.")
() => alert("Ви погодились."),
() => alert("Ви скасували виконання.")
*/!*
);
```

Looks short and clean, right?
Тепер все коротко і зрозуміло, правда?
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Rewrite with arrow functions
# Перепишіть з використанням стрілкових функцій

Replace Function Expressions with arrow functions in the code:
Замініть Функціональні Вирази на стрілкові функції у коді:

```js run
function ask(question, yes, no) {
Expand All @@ -10,8 +10,8 @@ function ask(question, yes, no) {
}

ask(
"Do you agree?",
function() { alert("You agreed."); },
function() { alert("You canceled the execution."); }
"Ви згодні?",
function() { alert("Ви погодились."); },
function() { alert("Ви скасували виконання."); }
);
```
Loading