Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3
The "switch" statement#80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
21 commits Select commitHold shift + click to select a range
3618c1e
1.2.14
otmon76689f6ef
Update article.md
otmon7646e7da1
Update 1-js/02-first-steps/14-switch/article.md
otmon768267ffd
Update 1-js/02-first-steps/14-switch/article.md
otmon76be04a15
Update 1-js/02-first-steps/14-switch/article.md
otmon76b43a7f7
Update 1-js/02-first-steps/14-switch/article.md
otmon760175f60
Update 1-js/02-first-steps/14-switch/article.md
otmon76f296504
Update 1-js/02-first-steps/14-switch/2-rewrite-if-switch/solution.md
otmon76a00b6ea
Update 1-js/02-first-steps/14-switch/2-rewrite-if-switch/solution.md
otmon7683c716b
Update 1-js/02-first-steps/14-switch/1-rewrite-switch-if-else/task.md
otmon76ec21520
Update 1-js/02-first-steps/14-switch/1-rewrite-switch-if-else/solutio…
otmon76ade3e94
Update 1-js/02-first-steps/14-switch/1-rewrite-switch-if-else/solutio…
otmon760118abc
Update 1-js/02-first-steps/14-switch/article.md
otmon76df55831
Update 1-js/02-first-steps/14-switch/article.md
otmon768b0a009
Update 1-js/02-first-steps/14-switch/article.md
otmon76f2e8640
Update 1-js/02-first-steps/14-switch/article.md
otmon7676ffe78
Update 1-js/02-first-steps/14-switch/article.md
otmon76a8d1eef
Update 1-js/02-first-steps/14-switch/article.md
otmon76bf79758
Update 1-js/02-first-steps/14-switch/article.md
otmon7617b7cf7
Update 1-js/02-first-steps/14-switch/article.md
otmon768ee22f1
Merge branch 'master' into 1.2.14
otmon76File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
24 changes: 12 additions & 12 deletions1-js/02-first-steps/14-switch/1-rewrite-switch-if-else/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
Abychom dosáhli přesné funkcionality příkazu`switch`,musí `if`používat striktní rovnost `'==='`. | ||
V tomto případě však pro zadané řetězce funguje i obyčejné`'=='`. | ||
```js no-beautify | ||
if(prohlížeč == 'Edge') { | ||
alert("Vy máte Edge!"); | ||
} else if (prohlížeč == 'Chrome' | ||
||prohlížeč == 'Firefox' | ||
||prohlížeč == 'Safari' | ||
||prohlížeč == 'Opera') { | ||
alert( 'V pořádku, tyto prohlížeče také podporujeme' ); | ||
} else { | ||
alert( 'Doufáme, že tato stránka vypadá dobře!' ); | ||
} | ||
``` | ||
Všimněte si, že konstrukce `prohlížeč == 'Chrome' ||prohlížeč == 'Firefox' …`je pro lepší čitelnost rozdělena do několika řádků. | ||
Ale i přesto je`switch`jasnější a přehlednější. |
12 changes: 6 additions & 6 deletions1-js/02-first-steps/14-switch/1-rewrite-switch-if-else/task.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions1-js/02-first-steps/14-switch/2-rewrite-if-switch/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions1-js/02-first-steps/14-switch/2-rewrite-if-switch/task.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
112 changes: 56 additions & 56 deletions1-js/02-first-steps/14-switch/article.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.