Skip to content

Instantly share code, notes, and snippets.

@joecliff
Last active August 29, 2015 14:01
Show Gist options
  • Save joecliff/56aca7fc76736ec1c74a to your computer and use it in GitHub Desktop.
Save joecliff/56aca7fc76736ec1c74a to your computer and use it in GitHub Desktop.
convert decimal to hexdecimal in js (js进制转换)
var num=12;
//12 -> c
var hex=12.toString(16);//same for other conditions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment