题解 | #计算某字符出现次数#

计算某字符出现次数

http://www.nowcoder.com/practice/a35ce98431874e3a820dbe4b2d0508b1

转化为小写,再循环寻找

const str = readline();
const word = readline().toLocaleLowerCase();
let i = 0, j = 0
for (; i < str.length; i++) if (str[i].toLocaleLowerCase() === word) j++;

console.log(j);
全部评论

相关推荐

野猪不是猪🐗:我assume that你must技术aspect是solid的,temperament也挺good的,however面试不太serious,generally会feel style上不够sharp
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
点赞
2
分享

创作者周榜

更多
牛客网
牛客企业服务