In this piece of code my button isn't working:

```
<html>
<body>
<p id='txt'>
    Unicorns
</p>
<button onclick="buttonChange()">Press</button>
<script>
function buttonChange() {
    var button=confirm("Press Me");
    if (button==true) {
        fn()
    }
}
var color = '#33cc33',
    elem  = document.getElementById('txt');

function fn() {
    elem.style.color = color;
    setTimeout(function() {
        color = '#'+Math.floor(Math.random()*16777215).toString(16);
        fn();
    }, 500);
}();
</script>
</body>
</html> 

```

Well that's not entirely true. To get the button to work I change the function fn() to a IIFE function.

Not much, but it works. Problem is the button works the fn() doesn't work. When the fn() works the button doesn't. My main goal is to have the button ask whether you want the word "Unicorn" to randomly switch colors. 

Summary: If you press ok, the fn() function begins (therefore making unicorn appear and change colours), when you press cancel, simply nothing happens.