Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Sync with upstream @ 5e893cff#232

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

Closed
javascript-translate-bot wants to merge7 commits intomasterfromsync-5e893cff
Closed
Show file tree
Hide file tree
Changes fromall 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
8 changes: 8 additions & 0 deletions1-js/02-first-steps/09-comparison/article.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -209,8 +209,16 @@ Jak se přes tyto příklady přenést? Měli bychom si tyto zvláštnosti neust

## Shrnutí

<<<<<<< HEAD
- Porovnávací operátory vracejí hodnotu typu boolean.
- Řetězce se porovnávají znak po znaku podle „slovníkového“ pořadí.
- Když se porovnávají hodnoty různých typů, převedou se na čísla (s výjimkou operátoru striktní rovnosti).
- Hodnoty `null` a `undefined` se rovnají `==` sobě navzájem, ale nerovnají se žádné jiné hodnotě.
- Buďte opatrní při používání porovnávání jako `<` nebo `>` na proměnné, které mohou být `null/undefined`. Dobrý nápad je odděleně ověřit, zda opravdu jsou `null/undefined`.
=======
- Comparison operators return a boolean value.
- Strings are compared letter-by-letter in the "dictionary" order.
- When values of different types are compared, they get converted to numbers (with the exclusion of a strict equality check).
- The values `null` and `undefined` are equal `==` to themselves and each other, but do not equal any other value.
- Be careful when using comparisons like `>` or `<` with variables that can occasionally be `null/undefined`. Checking for `null/undefined` separately is a good idea.
>>>>>>> 5e893cffce8e2346d4e50926d5148c70af172533
10 changes: 10 additions & 0 deletions1-js/09-classes/06-instanceof/article.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -55,9 +55,15 @@ Algoritmus operátoru `obj instanceof Třída` funguje zhruba následovně:
Například:

```js run
<<<<<<< HEAD
// nastavíme ověření instanceOf tak, aby předpokládalo,
// že všechno, co má vlastnost můžeŽrát, je zvíře
class Zvíře {
=======
// set up instanceof check that assumes that
// anything with canEat property is an animal
class Animal {
>>>>>>> 5e893cffce8e2346d4e50926d5148c70af172533
static [Symbol.hasInstance](obj) {
if (obj.můžeŽrát) return true;
}
Expand All@@ -68,7 +74,11 @@ Algoritmus operátoru `obj instanceof Třída` funguje zhruba následovně:
alert(obj instanceof Zvíře); // true: zavolá se Zvíře[Symbol.hasInstance](obj)
```

<<<<<<< HEAD
2. Většina tříd nemá `Symbol.hasInstance`. V tom případě je použita standardní logika: `obj instanceOf Třída` zjistí, zda se `Třída.prototype` rovná některému z prototypů v prototypovém řetězci objektu `obj`.
=======
2. Most classes do not have `Symbol.hasInstance`. In that case, the standard logic is used: `obj instanceof Class` checks whether `Class.prototype` is equal to one of the prototypes in the `obj` prototype chain.
>>>>>>> 5e893cffce8e2346d4e50926d5148c70af172533

Jinými slovy, porovnává jeden po druhém:
```js
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp