We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d22a35 commit 613e921Copy full SHA for 613e921
1 file changed
1-js/04-object-basics/01-object/article.md
@@ -427,6 +427,7 @@ The "integer property" term here means a string that can be converted to-and-fro
427
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:
428
429
```js run
430
+// Number(...) explicitly converts to a number
431
// Math.trunc is a built-in function that removes the decimal part
432
alert( String(Math.trunc(Number("49"))) ); // "49", same, integer property
433
alert( String(Math.trunc(Number("+49"))) ); // "49", not same "+49" ⇒ not integer property
0 commit comments