This course is about how JavaScript makes decisions: else if chains, combined conditions, the
conditional operator, and switch. Your project is to port the Python script a sailing club
member wrote to post Saturday’s race-day call.
Here’s a first taste, on a blustery morning with 25 knots of wind, gusting 28. The club races from 6 knots up to, but not including, 25. This Python code checks the club’s wind range:
wind_knots = 25
if 6 <= wind_knots < 25:
print("racing (good racing wind)")
elif wind_knots < 6:
print("postponed (too little wind)")
else:
print("postponed (too much wind)")
Python posts the right call:
postponed (too much wind)