Can someone please explain why my javascript function does not work, and how to improve?

these are my starter variables.

var gameData = {
    Points: 0,
    PointsPerClick: 1,
    PointsPerClickCost: 10
  }

I am just trying to say that once I have ten or more points- then something happens. I have tried various functions, but the IDE seems to ignore them all. This is just an example. Am I doing something wrong?

function LevelTen() {
if (gameData.Points >= 10) {
  alert("This is an alert message box.");  // display string message
}

My end goal is to add an image that pops up once a user gets to level ten. The above is just an example. Thank you for any tips! I am stumped and have been trying to get the functions to work for hours. Anytime I set the variables to an integer, the code seems to get ignored. The rest of my code runs great.