From 3fe989993f2836fe1db0b48ef29a057f857750e0 Mon Sep 17 00:00:00 2001 From: JasonLamv-t Date: Mon, 23 Oct 2023 14:16:05 +0800 Subject: [PATCH] fix: fix code result error for set.@@iterator and update the code example of set.clear --- .../javascript/reference/global_objects/set/@@iterator/index.md | 2 +- .../web/javascript/reference/global_objects/set/clear/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/javascript/reference/global_objects/set/@@iterator/index.md b/files/en-us/web/javascript/reference/global_objects/set/@@iterator/index.md index 93df99bab30e2d4..7e66e8da44117df 100644 --- a/files/en-us/web/javascript/reference/global_objects/set/@@iterator/index.md +++ b/files/en-us/web/javascript/reference/global_objects/set/@@iterator/index.md @@ -58,7 +58,7 @@ const setIter = mySet[Symbol.iterator](); console.log(setIter.next().value); // "0" console.log(setIter.next().value); // 1 -console.log(setIter.next().value); // Object +console.log(setIter.next().value); // {} ``` ## Specifications diff --git a/files/en-us/web/javascript/reference/global_objects/set/clear/index.md b/files/en-us/web/javascript/reference/global_objects/set/clear/index.md index ce5e6e77b43eed9..b4c168d9ce15891 100644 --- a/files/en-us/web/javascript/reference/global_objects/set/clear/index.md +++ b/files/en-us/web/javascript/reference/global_objects/set/clear/index.md @@ -40,7 +40,7 @@ console.log(mySet.has("foo")); // true mySet.clear(); console.log(mySet.size); // 0 -console.log(mySet.has("bar")); // false +console.log(mySet.has("foo")); // false ``` ## Specifications