# Selective to upperCase()

**URL:** <https://forum.kirupa.com/t/selective-to-uppercase/218841>\
**Category:** flash\
**Created:** [March 11, 2007, 7:41pm UTC](https://forum.kirupa.com/t/selective-to-uppercase/218841 "2007-03-11T19:41:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cki](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@cki](https://forum.kirupa.com/u/cki)\
**Post date:** [March 11, 2007, 7:41pm UTC](https://forum.kirupa.com/t/selective-to-uppercase/218841/1 "2007-03-11T19:41:17Z")

</div>

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.

```auto

//
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());
}

```
