League Points
JavaScript
20 pts
League Points
Keren FC has wins = 7, draws = 3 and losses = 2. A win is worth 3 points, a draw 1 point. Create:
points= wins × 3 + drawsgames= wins + draws + lossesreport= the string"Keren FC: 24 points from 12 games", built with+frompointsandgamesisLeader= whetherpointsis greater than 20exactly24= whetherpointsis strictly equal (===) to 24
Print exactly:
Keren FC: 24 points from 12 games Leader: true Exactly 24: true
Checklist
- Calculate
pointsandgames. - Build
reportwith string+. - Store the two comparisons, using
===for equality. - Print the three lines.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
