Tittle Case Sentence

function titleCase(str) {var complete ="";
  var str2=  str.toLowerCase().split(" ");
                         var str3 = str2;
  for (var i =0;i<str3.length;i++){ complete +=str2[i].charAt(0).toUpperCase()+str2[i].substr(1)+" ";}
return complete ;

}

titleCase("HERE IS MY HANDLE HERE IS MY SPOUT");

Why it is not working ?

I cleaned up your code.
You need to use triple backticks to post code to the forum.
See this post for details.

Sorry I shouldn’t have uploaded the code.but thnx all of u to help me out I was really stucked mo