minor fixes
This commit is contained in:
parent
80148c07b1
commit
233d63c927
1 changed files with 3 additions and 1 deletions
|
@ -250,7 +250,9 @@ The last three lines may need additional explanation:
|
||||||
```smart header="The `typeof(x)` syntax"
|
```smart header="The `typeof(x)` syntax"
|
||||||
You may also come across another syntax: `typeof(x)`. It's the same as `typeof x`.
|
You may also come across another syntax: `typeof(x)`. It's the same as `typeof x`.
|
||||||
|
|
||||||
The parentheses here aren't a part of the `typeof` operator. It's the kind of parentheses used for mathematical grouping. Usually, such parentheses contain a mathematical expression, such as `(2 + 2)`, but here they contain only one argument `(x)`. Syntactically, they allow to avoid a space between the `typeof` operator and its argument, and some people like it.
|
To put it clear: `typeof` is an operator, not a function. The parentheses here aren't a part of the `typeof`. It's the kind of parentheses used for mathematical grouping.
|
||||||
|
|
||||||
|
Usually, such parentheses contain a mathematical expression, such as `(2 + 2)`, but here they contain only one argument `(x)`. Syntactically, they allow to avoid a space between the `typeof` operator and its argument, and some people like it.
|
||||||
|
|
||||||
Some people prefer `typeof(x)`, although the `typeof x` syntax is much more common.
|
Some people prefer `typeof(x)`, although the `typeof x` syntax is much more common.
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue