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
Зареєструйся Зараз
або Підпишись на майбутні тести