//sample solution
function capitalizeFirst(str) {
/*Write the function body below to return a string that is
identical to str except that its first letter is capitalized.*/
return str[0].toUpperCase()+str.substring(1,str.length);
}
//test
capitalizeFirst("ant");
No comments:
Post a Comment