ClassName Toggle JS
document.getElementById('myButton').onclick = function() {
this.classList.toggle('active');
}
Yucky Yak
document.getElementById('myButton').onclick = function() {
this.classList.toggle('active');
}
<button class="" id="changeicon">
<i id="slideshow" class="fas fa-hamburger"></i>
</button>
$("#changeicon").click(function() {
$("#slideshow").toggleClass("fa-times");
});