Football Ticket Code
JavaScript
20 pts
Football Ticket Code
The starter has let player = "yonas tekle";, let number = "7"; and let city = "Mendefera";.
- Create
code: the first 3 letters ofcityin upper case, a dash, andnumberpadded with zeros to 3 characters. Print it. - Create
shout:playerin upper case followed by three exclamation marks made withrepeat. Print it. - Print the length of
code.
Expected output:
MEN-007 YONAS TEKLE!!! 7
Do not type MEN, 007 or YONAS yourself — use methods.
Checklist
- Create
codewithsliceandpadStart. - Create
shoutwithtoUpperCaseandrepeat. - Let the methods make the text (no typed results).
- 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.
