Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3
Basic operators, maths#74
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
17 commits Select commitHold shift + click to select a range
239be5b
1.2.8
otmon7608106cb
Update 1-js/02-first-steps/08-operators/1-increment-order/solution.md
otmon7681d715a
Update 1-js/02-first-steps/08-operators/1-increment-order/solution.md
otmon76abf3900
Update 1-js/02-first-steps/08-operators/1-increment-order/task.md
otmon762571325
Update 1-js/02-first-steps/08-operators/article.md
otmon765b7a89b
Update 1-js/02-first-steps/08-operators/article.md
otmon76eb3dc1b
Update 1-js/02-first-steps/08-operators/article.md
otmon7653ff266
Update 1-js/02-first-steps/08-operators/article.md
otmon7658f4a25
Update 1-js/02-first-steps/08-operators/article.md
otmon76ef0ce09
Update 1-js/02-first-steps/08-operators/article.md
otmon764dde2aa
Update 1-js/02-first-steps/08-operators/article.md
otmon7673d05c6
Update 1-js/02-first-steps/08-operators/article.md
otmon765a7d24a
Update 1-js/02-first-steps/08-operators/article.md
otmon76477e8de
Update 1-js/02-first-steps/08-operators/article.md
otmon76cdf1bbf
Update 1-js/02-first-steps/08-operators/article.md
otmon76459de01
Update 1-js/02-first-steps/08-operators/article.md
otmon763fcabd4
Update 1-js/02-first-steps/08-operators/article.md
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
10 changes: 5 additions & 5 deletions1-js/02-first-steps/08-operators/1-increment-order/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/08-operators/1-increment-order/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/08-operators/2-assignment-result/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,5 +1,5 @@ | ||
Odpověď zní: | ||
- `a = 4` (vynásobí se 2) | ||
- `x = 5` (vypočítá se jako 1 + 4) | ||
4 changes: 2 additions & 2 deletions1-js/02-first-steps/08-operators/2-assignment-result/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
14 changes: 7 additions & 7 deletions1-js/02-first-steps/08-operators/3-primitive-conversions-questions/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
6 changes: 3 additions & 3 deletions1-js/02-first-steps/08-operators/3-primitive-conversions-questions/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
24 changes: 12 additions & 12 deletions1-js/02-first-steps/08-operators/4-fix-prompt/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,32 +1,32 @@ | ||
Důvodem je, že funkce `prompt` vrací uživatelský vstup jako řetězec. | ||
V proměnných jsou tedy hodnoty po řadě`"1"`a `"2"`. | ||
```js run | ||
let a = "1"; // prompt("První číslo?", 1); | ||
let b = "2"; // prompt("Druhé číslo?", 2); | ||
alert(a + b); // 12 | ||
``` | ||
To, co bychom měli udělat, je před sečtením převést řetězce na čísla. Například použít`Number()`nebo před ně uvést `+`. | ||
Například rovnou před `prompt`: | ||
```js run | ||
let a = +prompt("První číslo?", 1); | ||
let b = +prompt("Druhé číslo?", 2); | ||
alert(a + b); // 3 | ||
``` | ||
Nebo až při volání `alert`: | ||
```js run | ||
let a = prompt("První číslo?", 1); | ||
let b = prompt("Druhé číslo?", 2); | ||
alert(+a + +b); // 3 | ||
``` | ||
V posledním kódu používáme současně unární i binární `+`. Vypadá to legračně, že? |
12 changes: 6 additions & 6 deletions1-js/02-first-steps/08-operators/4-fix-prompt/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
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
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.