How to pause audio in JavaScript

DOM
By Jad Joubran · 
Last updated Mar 12, 2018
<audio id="audio" controls>
  <source src="audio.mp3" type="audio/mpeg">
</audio>
const audio = document.querySelector("#audio");

audio.pause();