I have some code with it here when I made a script to convert between ASCII, Hexidecimal, and Binary for me since I needed to do that often for a cryptography class.
Since hex numbers are in base 16, you need to tell parseInt to interpret a base 16 number. Or binary numbers are in a base 2 system, so radix is 2. If you don't provide a radix, it just defaults to 10 since that's what the "main" number system is.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It's used when converting between number systems.
I have some code with it here when I made a script to convert between ASCII, Hexidecimal, and Binary for me since I needed to do that often for a cryptography class.
To go from hex to decimal to ASCII, I did this:
and to go from binary to decimal to ASCII, this:
Since hex numbers are in base 16, you need to tell parseInt to interpret a base 16 number. Or binary numbers are in a base 2 system, so radix is 2. If you don't provide a radix, it just defaults to 10 since that's what the "main" number system is.