From f678e280dfa1fb34ffde9967a06e2b9c61341b04 Mon Sep 17 00:00:00 2001
From: cheeslide <175485195+cheeslide@users.noreply.github.com>
Date: Thu, 23 Jan 2025 23:59:51 +0800
Subject: [PATCH] Update index.md
---
.../reference/global_objects/set/index.md | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/files/zh-cn/web/javascript/reference/global_objects/set/index.md b/files/zh-cn/web/javascript/reference/global_objects/set/index.md
index d2d87e6ec393e2..6d0c43422745c2 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/set/index.md
+++ b/files/zh-cn/web/javascript/reference/global_objects/set/index.md
@@ -59,7 +59,7 @@ l10n:
|
- |
+ |
{{jsxref("Set/union", "A.union(B)")}} |
@@ -67,7 +67,7 @@ l10n:
|
- |
+ |
{{jsxref("Set/isDisjointFrom", "A.isDisjointFrom(B)")}} |
@@ -75,7 +75,7 @@ l10n:
|
- |
+ |
{{jsxref("Set/isSubsetOf", "A.isSubsetOf(B)")}} |
@@ -83,7 +83,7 @@ l10n:
|
- |
+ |
{{jsxref("Set/isSupersetOf", "A.isSupersetOf(B)")}} |
@@ -91,7 +91,7 @@ l10n:
|
- |
+ |
@@ -255,19 +255,16 @@ for (const item of mySet1) {
console.log(item);
}
// 1、"some text"、{ "a": 1, "b": 2 }、{ "a": 1, "b": 2 }、5
-// 1, "some text", { "a": 1, "b": 2 }, { "a": 1, "b": 2 }, 5
for (const item of mySet1.keys()) {
console.log(item);
}
// 1、"some text"、{ "a": 1, "b": 2 }、{ "a": 1, "b": 2 }、5
-// 1, "some text", { "a": 1, "b": 2 }, { "a": 1, "b": 2 }, 5
for (const item of mySet1.values()) {
console.log(item);
}
// 1、"some text"、{ "a": 1, "b": 2 }、{ "a": 1, "b": 2 }、5
-// 1, "some text", { "a": 1, "b": 2 }, { "a": 1, "b": 2 }, 5
// 键和值是相同的
for (const [key, value] of mySet1.entries()) {