The parseInt() function parses a string and returns an integer. It has two parameters, first is the string to convert and second to specify which numeral system to be used.
In our code example numeral system is 8 (octal):
parseInt('08', 8) // 0
parseInt('05', 8) // 5
k = 0 + 5 // 5
Войдите чтобы поставить Нравится
Войдите чтобы прокомментировать