Hello everyone, in my code below, I used:
1- parseInt() function to convert the string to an integer
2- i used 8 radix, and this is my problem, what has happened when i added 8 radix to the parseInt() function? What are the changes will it make to the number? Why did I get 365 in the console?
NOTE: // i don’t except any result, because i am still new to radix, i want to know what will the 8 radix do to the number. //
let myNationality = “555”;
console.log(parseInt(myNationality, 8));
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15
Challenge Information:
Intermediate Algorithm Scripting - Everything Be True