I have googled for the past hour and can't find anything on typescript conversion of number to hex. The javascript solutions don't work.
How can I turn 100 into its hex representation using typescript?
toString(16)
is what you're looking for.
var g: number = 255;
alert(g.toString(16));
As found on http://www.c-sharpcorner.com/UploadFile/5089e0/number-object-method-in-typescript-part-41/
number.toString(16);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With