Update the Tags
JavaScript
10 pts
Update the Tags
A blog post has the tags "js" and "html". Change the Set tags with Set methods:
- add
"css" - add
"js"again (watch what happens) - delete
"html"
Then print tags, tags.size and tags.has("html"). Expected output:
Set(2) { "js", "css" }
2
false
Checklist
- Add
"css"to the Set. - Add
"js"a second time and see that no copy appears. - Delete
"html". - Print the Set, its size and whether it still has
"html".
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
