I have used this jscode to click on the button and to get redirected to the new page but its not working

document.getElementById("myproject-2").onclick=functio{
 location.href="https://aruneet-11.github.io/drumKit/";
}

used this code to go to that link when we click on the button but it’s not redirceting to the page.Nothing happens when I click on the button and I have included the script file before the closing body tag.

I am expecting whenever I click on the button then It will open that link.