Uncertain about the recursive nature of this function.
var capitalizeWords = function(input) {
var results = [];
if(typeof input === 'string'){
return input.toUpperCase();
}else{
input.forEach(function(word){
results = results.concat(capitalizeWords(word));
});
}
return results;
};
//converts all words in the array to uppercase