MathF clamp not working

I have 2 variables I don’t want them to go under 0.0 so I clamped them but when running the game they go under the minimum of the clamp, what have I done wrong?

var health = 100.0;
var hunger = 100.0;


function Update () 
{
	hunger = hunger - Time.deltaTime/4;
	
	if( hunger <= 5)
	{
		health -= Time.deltaTime/4;
	}
}

hunger = Mathf.Clamp(hunger, 0.0, 100.0);
health = Mathf.Clamp(health, 0.0, 100.0);

Your “Mathf.Clamp” is not in Update function. In update you are lowering hunger every call, but your clamp is not called.

    var health = 100.0;
    var hunger = 100.0;
     
     
    function Update ()
    {
      hunger = hunger - Time.deltaTime/4;
     
      if( hunger <= 5)
      {
        health -= Time.deltaTime/4;
      }
      

      hunger = Mathf.Clamp(hunger, 0.0, 100.0);
      health = Mathf.Clamp(health, 0.0, 100.0);
    }

How come this doesnt throw syntax error? (or is this allowed in unityscript?)