What will be the value of speed at the end?

2931

Since goFaster is false, speed will be 29 at the end.