Skip to content

Commit

Permalink
Merge pull request #48 from Tuoris/function-expressions-arrows
Browse files Browse the repository at this point in the history
Translation: First steps > Function expression and arrows
  • Loading branch information
tarasyyyk authored Oct 23, 2019
2 parents 28eb055 + b932575 commit 66b0a58
Show file tree
Hide file tree
Showing 3 changed files with 167 additions and 167 deletions.
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

0 comments on commit 66b0a58

Please sign in to comment.