From 7539722960886f84e65b53bae260eee40ae76c48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E6=81=8B?= Date: Wed, 24 Aug 2022 11:46:08 +0800 Subject: [PATCH] =?UTF-8?q?Update=2015-=E5=86=85=E7=BD=AE=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=20String=EF=BC=9A=E5=AD=97=E7=AC=A6=E4=B8=B2=E7=9A=84?= =?UTF-8?q?=E5=B8=B8=E8=A7=81=E6=96=B9=E6=B3=95.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【纠正错误】'o' -> 'a' --- 04-JavaScript基础/15-内置对象 String:字符串的常见方法.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/04-JavaScript基础/15-内置对象 String:字符串的常见方法.md b/04-JavaScript基础/15-内置对象 String:字符串的常见方法.md index 3f6a706..d846c67 100644 --- a/04-JavaScript基础/15-内置对象 String:字符串的常见方法.md +++ b/04-JavaScript基础/15-内置对象 String:字符串的常见方法.md @@ -133,7 +133,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);