Javascript - Challenge
Code Life
By Pierre Marsaa
Codédex Entry Formatter
The Codédex prints one neat line per Codémon, with an identifier, a padded name and a short code.
Step 1: entryId(number) returns the number on 3 digits filled with zeros, prefixed by "#". For 7 it returns "#007".
Step 2: shortCode(name) returns the first three letters of the name in uppercase.
Step 3: for each Codémon, print its id, then its name padded to 10 characters with spaces, then its short code.
Step 4: close with a line of 20 dashes built with .repeat().
Expected output:
Loading editor...
↗️
Loading editor...
↶
↷
💡 Show Solution
Continue