Fix typos
This commit is contained in:
@ -10,8 +10,8 @@ lastUpdated: 2021-01-07T00:20:34+02:00
|
|||||||
|
|
||||||
Removes an element from the DOM.
|
Removes an element from the DOM.
|
||||||
|
|
||||||
- Use `Element.parentNode` to get the given element's parent node.
|
- Use `Node.parentNode` to get the given element's parent node.
|
||||||
- Use `Element.removeChild()` to remove the given element from its parent node.
|
- Use `Node.removeChild()` to remove the given element from its parent node.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const removeElement = el => el.parentNode.removeChild(el);
|
const removeElement = el => el.parentNode.removeChild(el);
|
||||||
|
|||||||
Reference in New Issue
Block a user