Match Score Line
JavaScript
10 pts
Match Score Line
The starter has team, goals, opponent and against. Print two lines using template literals only (no + joining):
- The score line: team, goals, a dash, against, opponent.
- The goal difference, calculated inside
${ }asgoals - against.
Expected output:
Keren FC 2 - 1 Massawa United Goal difference: 1
Checklist
- Print the score line with a template literal.
- Calculate the goal difference inside
${ }. - Use no
+joining. - The two lines match.
🔑 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.
