View Full Version : Changing Variables
04-18-2005, 08:10 PM
Is there a certain way to go about to changing a number into a string? I'm trying to make this number change into a string so I can then search the string and add to a different stuff because of what's inside of the first string. Can anybody help me?
04-18-2005, 08:35 PM
You can use the toString method.
k = 25;
x = k.toString();
04-19-2005, 04:53 AM
If you will append the number into a string, you don't need to convert the number into a string because it is automatically converted to string.
var s = "blah"
var s2 = s + 1; //blah1
04-19-2005, 08:25 AM
var a = 1
a = "" + 1
Ah, the good old days of newbie coding. But it worked! :p
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.