Reply To: Computer Programmer

Home Forums Decaffeinated Coffee Computer Programmer Reply To: Computer Programmer

#763824
HaLeiVi
Participant

That is only for the one line

getGlassOf(this.thirsty? water : null)

However, if you’d write out the

if (this.thirsty)

getGlassOf(water)

you wouldn’t need the empty one. On the other hand, thinking like a programmer you’d say it’s simpler to just bring two.

Is there an actual difference in process time between the two methods, Zach?