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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,4 @@ sftp-config.json
Thumbs.db


*.bak
token.txt
/svgs

/svgs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion 1-js/02-first-steps/16-function-expressions/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,4 +377,4 @@ Je také lépe čitelná, protože je jednodušší najít v kódu `function f(

Ve většině případů, kdy potřebujeme deklarovat funkci, dáváme přednost deklaraci funkce, protože pak je funkce viditelná ještě před samotnou deklarací. To nám dává více možností při organizaci kódu a je to zpravidla čitelnější.

Funkční výrazy bychom tedy měli používat jen tehdy, když nám pro naše účely deklarace funkce nestačí. V této kapitole jsme viděli několik takových příkladů a v budoucnu uvidíme další.
Funkční výrazy bychom tedy měli používat jen tehdy, když nám pro naše účely deklarace funkce nestačí. V této kapitole jsme viděli několik takových příkladů a v budoucnu uvidíme další.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@

```js run
function zeptejSe(otázka, ano, ne) {
if (confirm(otázka)) ano();
else ne();
function ask(question, yes, no) {
if (confirm(question)) yes();
else no();
}

zeptejSe(
"Souhlasíte?",
ask(
"Do you agree?",
*!*
() => alert("Souhlasil jste."),
() => alert("Zrušil jste provádění.")
() => alert("You agreed."),
() => alert("You canceled the execution.")
*/!*
);
```

Vypadá to stručně a čistě, že?
Looks short and clean, right?
Loading