Javascript - Challenge
Code Life
By Pierre Marsaa
Unique Move Pool
Several Codémon share the same moves. Build the arena's move pool, where each move appears only once.
Step 1: gather every move of every Codémon into one flat array, and print "Moves listed: N".
Step 2: build a Set from that array and print "Different moves: N".
Step 3: turn the Set back into an array, sort it alphabetically, and print the moves joined with ", ".
Step 4: print "Shared: N" with the number of moves that appeared more than once in the original list.
Expected output:
Loading editor...
↗️
Loading editor...
↶
↷
💡 Show Solution
Continue