I fixed some problems with code objects and tried to convert a string to a list of numbers like this:
"102904".split("").map(parseInt);
The expected result will be something like this:
[1, 0, 2, 9, 0, 4]
But instead, it returns:
[1, NaN, NaN, NaN, 0, 4]
Consider that the card should apply to each item in the list that contains 1-digit strings. One would think that it does not understand correctly, because the database is not used, but:
"102904".split("").map(function(x){ return parseInt(x);});
[ 1, 0, 2, 9, 0, 4]
Use parseInt(x, 10)does not change the result. But sending directly parseInt to the card creates NaN...
I tried Chrome and Firefox and get the same results.
source
share