javascript – If class doesn’t exist do this else ignore

var elem = document.querySelector('.product-details');
if(!elem.classlist.contains('.promo')){
   document.querySelector('.title').innerHTML += "<span class="promo">Add Promo Banner</span>";
 }
.product-details {border: 1px black solid; margin: 10px 0}
<div class="product-details">
  <div class="title">Title</div>
  <div class="promo">Promo 20% off</div>
</div>

<div class="product-details">
  <div class="title">Title</div>
</div>