JS Built-ins
GlobalFunctionsparseIntbeginner

parseInt β€” hexadecimal radix

πŸ“– Usage Example
parseInt('ff', 16)   // β†’ 255
parseInt('FF', 16)   // β†’ 255  (case-insensitive)

parseInt('ff', 16) parses hexadecimal β€” ff equals 255 in decimal.

parseInt with Hex

parseInt('ff', 16) parses hex ff, returning 255.

Challenge: Verify the hex parse.

πŸ’‘ Hints (1)
  • β€’ Base 16 is hexadecimal. 'ff' in hex equals 255 in decimal.