0
Не ошибка

parseInt wrong parse

Francesco Zangara 8 лет назад в Общий обновлен Dmitry - support (expert) 8 лет назад 1

Project 1.irpz

parseInt function wrong parse "08" and "09" string.

more, the function wrong parse all string that start with "0" (ex.: "010" > 8, "011" > 9, "020" > 16)


I think that this bug is also present on iridium 2

Не ошибка

Hello!


var intValue = parseInt(string[, radix])

You need to specify the radix to 10. Since you have a number begins with 0, then the radix is automatically set to 8.


So your script will work with radix = 10.


Project 1 (7).irpz

Сервис поддержки клиентов работает на платформе UserEcho