Day 1: Conditional Statements (if, else if, else)
Daily Objective
Section titled “Daily Objective”Master conditional logic with if, else if, and else branches.
1. Conditional Syntax
Section titled “1. Conditional Syntax”const score = 85;
if (score >= 90) { console.log('Grade: A');} else if (score >= 80) { console.log('Grade: B');} else if (score >= 70) { console.log('Grade: C');} else { console.log('Grade: Needs Improvement');}Daily Hands-on Practice (70%)
Section titled “Daily Hands-on Practice (70%)”- Write an age gate script that checks if a user is allowed entry (under 18: Denied, 18-64: Standard, 65+: Senior Discount).
- Test boundary values (17, 18, 64, 65).