parseInt faild "2018-3-7".split('-').map(parseInt)
Reported by
tblon...@gmail.com,
Mar 8 2018
|
||
Issue description
Chrome Version (from the about:version page): Version 61.0.3163.100 (Offizieller Build) (64-Bit)
Is this the most recent version:
OS + version: Opensuse 42.2
CPU architecture (32-bit / 64-bit): 64-bit
Window manager:
URLs (if relevant):
Behavior in Linux Firefox:
Behavior in Windows Chrome (if you have access to it):
What steps will reproduce the problem?
in the console
"2018-3-7".split('-').map(function(x){return parseInt(x)})
(3) [2018, 3, 7] working
"2018-3-7".split('-').map((x) => {return parseInt(x)} )
(3) [2018, 3, 7] working
"2018-3-7".split('-').map((x) => parseInt(x))
(3) [2018, 3, 7] working
1: "2018-3-7".split('-').map(parseInt)
(3) [2018, NaN, NaN] ??? not working
2: "2018-3-7-6-7-8-9-0-555-4-3-3-4-65".split('-').map(parseInt)
What is the expected result?
1: (3) [2018, 3, 7]
2: (14) [2018, 3, 7, 6, 7, 8, 9, 0, 555, 4, 3, 3, 4, 65]
What happens instead?
1: (3) [2018, NaN, NaN]
2: (14) [2018, NaN, NaN, NaN, NaN, NaN, NaN, 0, 365, 4, 3, 3, 4, 83]
Please provide any additional information below. Attach a screenshot
and backtrace if possible.
For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.
,
Mar 8 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by woxxom@gmail.com
, Mar 8 2018