convert a string to x,y,z types





7
Date Submitted Thu. Aug. 10th, 2006 2:20 AM
Revision 1 of 1
Syntax Master sundaramkumar
Tags JavaScript
Comments 0 comments
convert a string to x,y,z types

i = 12;
(hex string) s = "0x" + (i).toString(16);
(oct string) s = "0" + (i).toString(8);
(bin string) s = (i).toString(2);

 

Comments

There are currently no comments for this snippet.

Voting