mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-19 21:09:51 +08:00
fix(curriculum): code example for remove method (#53491)
This commit is contained in:
parent
78c4f0871a
commit
b0bdd6d254
@ -9,7 +9,12 @@ dashedName: step-85
|
||||
|
||||
Finally, you need to make the `#output` element visible so the user can see your text. Your `output` variable is an Element, which has a `classList` property. This property has a `.remove()` method, which accepts a string representing the class to remove from the element.
|
||||
|
||||
Use the `.remove()` method of the `output` variable's `classList` property to remove the `hide` class. Don't forget to place the word `hide` inside quotes.
|
||||
```js
|
||||
const paragraphElement = document.getElementById('paragraph');
|
||||
paragraphElement.classList.remove('hide');
|
||||
```
|
||||
|
||||
Use the `.remove()` method of the `output` variable's `classList` property to remove the `hide` class. Don't forget to place the word `hide` inside quotes.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user