From 563ca0a35e98678e2b7d5f154f31f496851e8d60 Mon Sep 17 00:00:00 2001 From: t7yang Date: Mon, 10 Jan 2022 08:38:07 +0800 Subject: remove code tag inside pre tag for zh-CN --- .../web/javascript/reference/global_objects/string/repeat/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/global_objects/string/repeat') diff --git a/files/zh-cn/web/javascript/reference/global_objects/string/repeat/index.html b/files/zh-cn/web/javascript/reference/global_objects/string/repeat/index.html index c0ee77fe21..e412b0da5c 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/string/repeat/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/string/repeat/index.html @@ -44,7 +44,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/repeat

此方法已添加到 ECMAScript 2015 规范中,并且可能尚未在所有 JavaScript 实现中可用。然而,你可以使用以下代码段对 String.prototype.repeat() 进行填充:

-
if (!String.prototype.repeat) {
+
if (!String.prototype.repeat) {
   String.prototype.repeat = function(count) {
     'use strict';
     if (this == null) {
@@ -83,7 +83,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/repeat
     }
     return rpt;
   }
-}
+}

示例

-- cgit v1.2.3-54-g00ecf