Skip to content

Commit b06c5c6

Browse files
oliviertassinariljharb
authored andcommitted
Avoid octal number interpretation
Some JavaScript versions interpret numbers as octal if they are written with a leading zero. Babel interpreter throws with an `Invalid number` message.
1 parent 712e010 commit b06c5c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -811,10 +811,10 @@ Other Style Guides
811811
console.log(...x);
812812
813813
// bad
814-
new (Function.prototype.bind.apply(Date, [null, 2016, 08, 05]));
814+
new (Function.prototype.bind.apply(Date, [null, 2016, 8, 5]));
815815
816816
// good
817-
new Date(...[2016, 08, 05]);
817+
new Date(...[2016, 8, 5]);
818818
```
819819

820820
<a name="functions--signature-invocation-indentation"></a>

0 commit comments

Comments
 (0)