Help! creating a platform game tutorial NOT WORKING!

I did the basic movement code and it was working fine, but i dont understand how to do the gravity and jumping. it says:
Gravity and Jumping
Next up we need jumping. This code will give you jumping; it would be inserted after the other key.isDown events
i copied the code and did it in my char but when i test it, it says there are 3 errors!
Tell me how do i have to do the code so it wont say errors!