Let's practice tidying some messy code.
This code prints a list of names and then checks that exactly two inputs match the expected number.
π Run npm start
. You'll see a list of names printed to the console. Notice that the code is currently failing.
π Read /src/index.js
π Together with your partner, tidy the code up until the marker saying "β STOP".
π Aim to make the code more readable, clean, and data-driven.
π You should also fix the bug somewhere in lines 0-43 which is causing the code to fail.
βοΈ When you're finished, the section after the "β STOP" marker should be unaltered. Running npm start
should list all the names just like before, and then show a "β
SUCCESS" message.
π Happy coding!