Hi,
After “googling” without success, could some provide a URL or code sample that would illustrate how to output the following:
“This Is Not A Love Song”
Where the first letter of each word is capitalized.
//
var words:Array = new Array();
var sentence:String = " ";
//
function fillArray() {
words = arguments;
// arguments is an array
// arguments* is undefined
var len:Number = arguments.length;
for (var i:Number = 0; i<len; i++) {
//trace("argument "+i+" is: "+arguments*);
}
formatArray(words);
}
//
fillArray("This", "is", "not", "a", "love", "song");
//
function formatArray(w:Array) {
var sentence:String = "";
for (var i:Number = 0; i<w.length; i++) {
sentence += w*;
sentence += (i<w.length-1) ? " " : ".";
}
trace(sentence.toUpperCase());
}