Code not working help!

Im trying to make this age guessing random game work but its not working properly, wont exit loop when i type in my age and wont display alert message when typing 30 or 25. Help!

var age = 22;

var input = prompt("Guess my age");

while (input !== age) {
   if (input === 30) {
       alert("Nope, try again");
   }  else if (input === 25) {
       alert("Quite close");
   }

   var input = prompt("Guess my age");


}
console.log("Yay you guess it!");

Oh thanks it was about string comparing to numbers, my bad. Thanks for your answer.

Good to know that too. Thanks. But i wanted that prompt message to go in loop while input is not equal to age thought.

And does it mean that loop change in this case that prompt message doesnt have to be put in bottom of code block in while loop?