We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如何使用本模板:
如果和代码相关,请在这里粘贴你的全部代码
The text was updated successfully, but these errors were encountered:
// 好吧,承认代码是丑了点,但输出是对的。。。
function titleCase(str) { // 请把你的代码写在这里 strTemp = str.toLowerCase().split(' ');// 输出单词列表 var strConvert = ''; for (i=0;i<strTemp.length;i++) { strConvert = strTemp[i][0].toUpperCase() + strTemp[i].slice(1); // slice (start,end)字符串从start位置开始切分 if (i===0) { str = strConvert; } else if (i>0) { str = str + ' ' + strConvert; } } return (""" + str + """) ; }
titleCase("I'm a little tea pot");
Sorry, something went wrong.
No branches or pull requests
注意:这里只处理 FreeCodeCamp.cn 的相关问题,不处理 w3cschool 的任何问题
注意:请不要乱开无意义的 Issue,违者直接加黑名单
注意:Issue 是用来处理代码库中的 bug,不是用来提问题的。完成挑战过程中遇到的代码问题请在gitter 讨论组 或者 QQ 群 526289580 中讨论 (QQ 群验证答案: freeCodeCamp 注意大小写)
FreeCodeCamp.cn Issue 模板
如何使用本模板:
以上内容请在提交 Issue 之前删除
浏览器信息
问题描述
你的代码
截图(如果有)
The text was updated successfully, but these errors were encountered: