javascript
How do you convert a number/ integer
into a string, e.g.
"10" to "ten".
Any help is appreciated.
Web Development
How do you convert a number/ integer
into a string, e.g.
"10" to "ten".
Any help is appreciated.
by michael2
tmp_string = number.toString();
if number above was 10, the integer tmp_string will be "10" the string. There is no javascript function for returning "ten" from the integer 10.
You would have to use switch()and write something along the lines of
switch(x){
case 1:
x = "one"
break;
case 2:
x = "two"
break;
etc,ect,,
}
by ogunbooa
THanx Michael,
It works... do you have any online resources for advanced javascripting...?
Seyi
by ogunbooa
This discussion is closed to new replies.
Sort by Trending