This is a simple function that I created for this challenge. It changes the font of the H1 element by assigning it a class name that corresponds with a few CSS classes I set to have diifferent fonts.
function changeFont(fontName){
document.querySelector('h1').className = fontName;
}
changeFont("courier");
const changeFont = function(fontName){
document.querySelector('h1').className = fontName;
}
changeFont("verdana");
const changeFont = fontName => document.querySelector('h1').className = fontName;
changeFont("times");