This words to set the html but when it happens it not only writes the h1 element but it also writes the whole function, how can I make it so it only writes whats inside of the two `
function tokens() {
return `
<h1>test</h1>
`;
}
document.getElementById('tokens').innerHTML = tokens;
>Solution :
Change
document.getElementById('tokens').innerHTML = tokens;
by this
document.getElementById('tokens').innerHTML = tokens();