Copy link to clipboard
Copied
What I am after, is taking a string, then taking each character in that string and making it a variable, then displaying each character by itself. My problem is figuring that out. I thought I would try using a for loop and creating each character variable like that, but it doesn't work. I doesn't display anything. Here is my code so far, it seems like the closest thing I've gotten to:
for (var i:Number=1; i<=myString.length; i++)
{
var letNum:String = myString.charAt(i);
var let:String = letNum;
}
Is there a way to do this? Am I on the right track?
var s:String="whatever";
var a:Array=s.split("");
you know have variables (a[0], a[1],...) with values = to the letters of s.
Copy link to clipboard
Copied
var s:String="whatever";
var a:Array=s.split("");
you know have variables (a[0], a[1],...) with values = to the letters of s.