remove
remove
remove deletes an element from the DOM. After removal, the element is no longer part of the page tree.
This is different from hiding text or clearing content. The node itself should be gone, while sibling elements should remain where they are.
Your task: Select the expired alert and remove it from the page. Leave the current alert visible.
Free with a JS Exercises account
Sign in to start coding, run your solution, and keep your progress saved for later. No payment needed.
By continuing, you agree to our Terms and Privacy Policy. We'll send occasional product updates and news. You can unsubscribe anytime.
remove
remove deletes an element from the DOM. After removal, the element is no longer part of the page tree.
This is different from hiding text or clearing content. The node itself should be gone, while sibling elements should remain where they are.
Your task: Select the expired alert and remove it from the page. Leave the current alert visible.