Arrow functions, the basics by ockley · Pull Request #217 · javascript-tutorial/da.javascript.info · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Rewrite with arrow functions
# Omskriv med pilefunktioner

Replace Function Expressions with arrow functions in the code below:
Erstat Funktionsudtryk med pilefunktioner i koden nedenfor:

```js run
function ask(question, yes, no) {
Expand All @@ -11,7 +11,7 @@ function ask(question, yes, no) {

ask(
"Do you agree?",
function() { alert("You agreed."); },
function() { alert("You canceled the execution."); }
function() { alert("Du er enig."); },
function() { alert("Du annullerede udførelsen."); }
);
```
73 changes: 36 additions & 37 deletions 1-js/02-first-steps/17-arrow-functions-basics/article.md