Lesson 5, Exercise 1, Sub-Option 2-2: The Art of Crashlanding

Part 2: Advanced Crashlanding Techniques

Objective: Crashland with style!

In this exercise, you will learn to crash with finesse. You will learn to pick up speed, control your trajectory, and land like a pro... or at least like a moderately skilled amateur.

Read the following code and analyze it for errors:

			
<!-- This is a crash landing script -->
var crash = true;
if (crash) {
	var speed = 100;
	var angle = 45;
	var altitude = 100;
	var airspeed = 50;
}
			
		

What do you think is wrong with this code?

Exercise Solution:

Correct the above errors and add comments to explain your reasoning.