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
如何使用本模板:
function truncate(str, num) { // 请把你的代码写在这里. return str.length > num ? str.slice(0, num) + "..." : str; }
truncate("A-tisket a-tasket A green and yellow basket", 11);
如果和代码相关,请在这里粘贴你的全部代码
The text was updated successfully, but these errors were encountered:
No branches or pull requests
注意:这里只处理 FreeCodeCamp.cn 的相关问题,不处理 w3cschool 的任何问题
注意:请不要乱开无意义的 Issue,违者直接加黑名单
注意:Issue 是用来处理代码库中的 bug,不是用来提问题的。完成挑战过程中遇到的代码问题请在gitter 讨论组 或者 QQ 群 526289580 中讨论 (QQ 群验证答案: freeCodeCamp 注意大小写)
FreeCodeCamp.cn Issue 模板
如何使用本模板:
以上内容请在提交 Issue 之前删除
浏览器信息
问题描述
你好,这里设置验证好像有点问题,按照truncate("A-tisket a-tasket A green and yellow basket", 11);应该返回‘A-tisket a-...’,而不是答案要求的‘A-tisket...’
你的代码
function truncate(str, num) {
// 请把你的代码写在这里.
return str.length > num ? str.slice(0, num) + "..." : str;
}
truncate("A-tisket a-tasket A green and yellow basket", 11);
截图(如果有)
The text was updated successfully, but these errors were encountered: