are you asking a question, or want to contribute to the guide? I don’t understand
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
The .delete method for a set will return a true or false. Here’s more about it:
That means you cannot chain methods together. So this:
set.delete(item) // returns true
.delete(item) // this will make an error because true doesn't have a delete attribute it's just a boolean.
While the .add method returns the NEW set with the added value into it.
Here’s an mdn about it:
Hope this helps you understand a little bit…
Tip: This will always apply when you are trying to chain methods. Always check what the method returns before trying to chain a lot of methods at once. Or just not chain it and call it again.