Match Report Layout
JavaScript
20 pts
Match Report Layout
Print this match report exactly:
Keren FC 3 - 1 Massawa Stars Goals: 4 Yellow cards: 2 Corners: 9
Rules about the layout of your code:
- The first statement is long: write it as
console.log("Keren FC", 3, "-", 1, "Massawa Stars");but break it over several lines (start a new line right after the opening bracket). - Put the Goals and Yellow cards statements on one line, separated by a semicolon.
- Calculate the goals with
3 + 1and the corners with5 + 4.
Checklist
- Print the four lines of the report.
- Spread the first statement over several lines.
- Put two statements on one line.
- Calculate the goals and the corners.
🔑 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.
