<div class="container">
  <div class="hello">Hello</div>
  <div class="goodbye">Goodbye</div>
</div>
{
  const ex1 = $('.hello').remove()
  const ex2 = $('div').remove('.hello')
}

{
  const ex1 = document.querySelectorAll('.hello').forEach(element => {
    element.remove()
  })
  const ex2 = Array.from(document.querySelectorAll('div')).filter(element => {
    return element.matches('.hello')
  }).forEach(element => {
    element.remove()
  })
}

External CSS

  1. https://cdnjs.cloudflare.com/ajax/libs/modern-normalize/1.1.0/modern-normalize.min.css
  2. https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&amp;display=swap

External JavaScript

  1. https://releases.jquery.com/git/jquery-3.x-git.slim.min.js