You are using the strict equality operator, so since age is a string (from the prompt) and 31 is a number, they are not strictly equal. If you use == instead, the else if condition will evaluate to true and “Perfect” will be displayed to the console.
Actually, the main reason the console.log does not execute is that if you enter 31 for the prompt, your first if statement evaluates to true, because age gets coerced into a number and since 31 is greater than or equal to 21,