Konversi fungsi fadeout jQuery ke kode javascript murni

//javascript
el.classList.add('hide');
el.classList.remove('show');

//css
.show {
  opacity: 1;
}
.hide {
  opacity: 0;
  transition: opacity 400ms;
}
Relieved Rattlesnake