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

Commit 613e921

Browse files
committed
closes #2910
1 parent 1d22a35 commit 613e921

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎1-js/04-object-basics/01-object/article.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ The "integer property" term here means a string that can be converted to-and-fro
427427
So, "49" is an integer property name, because when it's transformed to an integer number and back, it's still the same. But "+49" and "1.2" are not:
428428
429429
```js run
430+
// Number(...) explicitly converts to a number
430431
// Math.trunc is a built-in function that removes the decimal part
431432
alert( String(Math.trunc(Number("49"))) ); // "49", same, integer property
432433
alert( String(Math.trunc(Number("+49"))) ); // "49", not same "+49" ⇒ not integer property

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /