题解 | #计算某字母出现次数#
计算某字母出现次数
http://www.nowcoder.com/practice/a35ce98431874e3a820dbe4b2d0508b1
const line = readline().toUpperCase() const code = readline().toUpperCase() function findNum() { let count = 0 for(let i=0;i<line.length;i++) { if(line[i]===code) { count++ } } return count } console.log(findNum())