🏛️ College Admission (Form Logic) · Mission 6 of 6
🏛️ The Admission Desk
Put it all together: check everything, and either admit the student with their fee or list what to fix.
Your mission
- showRoom = form.hostel. errors = [ ].
- Add an error for an empty name, an age outside 17–25, and marks below the course's cut-off (60, 50 or 45).
- No errors: ok = true, work out the fee, message = "Admitted to " + form.course + "! Fee: ₹" + fee. Otherwise ok = false, message = "Please fix " + length(errors) + " problem(s)".
Getting the mission ready…