Else statement not Working

Hi, I am working on a HTML, JavaScript and CSS project.
The else statement errors on the animation section.
The error I am getting is : Declaration or statement required.
See Code below:
document.addEventListener(‘DOMContentLoaded’, function() {

            const h1 = document.querySelector('h1');
            h1.style.animationPlayState = 'paused';

            document.querySelector('button').onclick = () => {
                if (h1.style.animationPlayState === 'paused'); {
                    h1.style.animationPlayState = 'running'; 
                } else {
                    h1.style.animationPlayState = 'paused';

Please assist.

Welcome to the forum @Laetitia

Try removing the semi-colon from the condition check.

Happy coding

Good day Teller,
Thanks a million. I don’t know how I missed it.
Code is running correctly now.
I am so happy I found a place to ask questions.
Have a great day.