My current challenge involves trying to capitalize the first letter of each element in the following array. So far, it's only returning the second word as capitalized.
var clenk = ["ham","cheese"];
var i = 0;
for (i = 0; i < clenk.length; i++) {
var result = clenk[i].replace(/\b./g, function(m){ return m.toUpperCase(); });
}
alert(result);