From 2f6d199dc1d606e9336bd7bdd6266293b50d84da Mon Sep 17 00:00:00 2001 From: heibaiying <31504331+heibaiying@users.noreply.github.com> Date: Sat, 14 Sep 2019 11:28:03 +0800 Subject: [PATCH] =?UTF-8?q?Update=20JavaScript=5F=E5=9F=BA=E7=A1=80.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notes/JavaScript_基础.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes/JavaScript_基础.md b/notes/JavaScript_基础.md index d02089d..19ae2d1 100644 --- a/notes/JavaScript_基础.md +++ b/notes/JavaScript_基础.md @@ -92,7 +92,7 @@ alert(stringValue.substr(-3)); // "rld" 按照规则等价于: subs // 当第二个参数为负值时 alert(stringValue.slice(3, -4)); // "lo w" 按照规则等价于: slice(3,7) -alert(stringValue.substring(3, -4)); // "hel" 按照规则等价于: substring(3,0) +alert(stringValue.substring(3, -4)); // "hel" 按照规则等价于: substring(3,0) alert(stringValue.substr(3, -4)); // ""(空字符串) 按照规则等价于: substr(3,0) ```