Consider following code snippet:
 var k; k = parseInt('08', 8) + parseInt('05', 8); 
What will be the value of a k variable?
Explanation
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

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты