Ben Bacarisse
9/26/2015 9:59:00 AM
jonas.thornvall@gmail.com writes:
> Den lördag 26 september 2015 kl. 00:11:31 UTC+2 skrev Danny:
>> to jonas.t
>>
>> in short, if the value is an integer, it will never return NaN.
>> What if may be happening in your case, is that the object gets
>> something else other than a numeric value.
>>
>> but a solution depends on what the context for all that is
>> and you haven't given us context or relevant code of the matter
>
> Well sometimes the index of the array is empty for the leading
> position, it is an carry operation.
As yet unassigned positions in an array are undefined but the isNaN
function returned true for undefined values. It's likely that you don't
have a numeric NaN in addOne[i], but undefined instead.
--
Ben.