How can i assign the below code to a number?
Integer.toHexString( myHexValue );
How can i assign the below code to a number?
Integer.toHexString( myHexValue );
The second optional argument to parseInt is the radix.
parseInt("0xff", 16);
// yields 255
Convert it back to an integer...
var s = "FFFFFF";
var n = parseInt("0x"+ s);
You can cast the hex value as a "Number". For example:
foo = Number(0xDEADBEEF)
Hope this helps.