Skip to content

Commit

Permalink
fix: issue qianguyihao#258
Browse files Browse the repository at this point in the history
  • Loading branch information
qianguyihao committed Aug 20, 2023
1 parent 0123762 commit 291fb8e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ var num = 0;
while (index !== -1) {
console.log(index);
num++; // 每打印一次,就计数一次
index = str.indexOf('o', index + 1);
index = str.indexOf('a', index + 1);
}

console.log('a 出现的次数是: ' + num);
Expand Down

0 comments on commit 291fb8e

Please sign in to comment.