Need help with greater-than statement

How do you write an if greater than statement? I want two variables to detect if one of the variables is greater than the other and then subtract 1 from a third variable if so. Here is my code,

var population = 100;
var food = 0;
var happiness = 60;

function Update () {
    if (var population) > var food;
    var happiness - 0.01 * Time.deltaTime;
}

You need to stop using the word var everywhere - use it when you want to declare a variable, not to use it.

On top of that, you may need to declare your happiness variable as a float.

Also - you need to put both variables into the brackets when using greater than, like this:

var population = 100;
var food = 0;
var happiness = 60.0;

function Update ()
{
    if (population > food)
       happiness -= 0.01 * Time.deltaTime;
}