You created it but never called it. When is this supposed to be called?
perhaps every time the correct selection is clicked
Naming a function as a question (e.g. isThisTrue) tells me that it only checks a condition but doesn't actually do anything, it only returns True or False.
This function does a window.location.href, so it's changing something, not just checking a condition.
I would rename this function to something like "nextLevelIfComplete" or something like that.
You return true before you do the window.location.href, which means it will never get to the window.location.href.
You should return true after the window.location.href
A couple of problems with this function