Maximum Value

how do a get a maximum value of a power calculation

can it be something like this??

var mPower = 0;

if (power > mPower) {

mPower = power;

}

??