Logo

Programming-Idioms

History of Idiom 142 > diff from v23 to v24

Edit summary for version 24 by justafoo:
[JS] const, fix formatting

Version 23

2019-09-26, 17:03:24

Version 24

2019-09-26, 18:29:32

Idiom #142 Hexadecimal digits of an integer

Assign to string s the hexadecimal representation (base 16) of integer x.

E.g. 999 -> "3e7"

Idiom #142 Hexadecimal digits of an integer

Assign to string s the hexadecimal representation (base 16) of integer x.

E.g. 999 -> "3e7"

Extra Keywords
hex hexa radix
Extra Keywords
hex hexa radix
Code
let s = x.toString (16)
Code
const s = x.toString(16)