/dec-to-hex

convert decimal (base 10) numbers to hexidecimal

Primary LanguageJavaScript

dec-to-hex

convert decimal (base 10) numbers to hexidecimal

I wrote this as an exercise. A better solution is.

  let dec = 255;
  let hex = dec.toString(16);