IF Statements - Unity Learn

Hello,

I am doing the scripting unity lessons. On the if statements chapter I get this code from the lesson.
I copy the script below in Microsoft Visual Studio and attach it to a cube in Unity.
But nothing prints in the console(I press space plenty).
The lesson does not say how to test it myslef.

Can anyone adivse?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class coffee : MonoBehaviour
{

    
            float coffeeTemperature = 85.0f;
            float hotLimitTemperature = 70.0f;
            float coldLimitTemperature = 40.0f;

    void Update()
            {
                if (Input.GetKeyDown(KeyCode.Space))
                    TemperatureTest();

                coffeeTemperature -= Time.deltaTime * 5f;
            }


            void TemperatureTest()
            {
                // If the coffee's temperature is greater than the hottest drinking temperature...
                if (coffeeTemperature > hotLimitTemperature)
                {
                    // ... do this.
                    print("Coffee is too hot.");
                }
                // If it isn't, but the coffee temperature is less than the coldest drinking temperature...
                else if (coffeeTemperature < coldLimitTemperature)
                {
                    // ... do this.
                    print("Coffee is too cold.");
                }
                // If it is neither of those then...
                else
                {
                    // ... do this.
                    print("Coffee is just right.");
                }
            }
        }

Your code looks correct to me. Make sure your code really is attached to an object in the scene, and that that object is active, and that you’re pressing the Play button before you test.

Ahhhhhh, i get it. Temperature drops as soon as I play and console logs only when i release space…
I get it now…