This test has three parts. In each file there is a test case and it is your task to implement a fix for each one. If you get stuck but you know how to pseudo solve the problem you can write that as a comment. Feel free to refactor code and if you find bugs in the test cases fix them and point those out. Place any comments in the code.
Split name strings into their respective parts
Fetch users and populate all of their friends
Validate if two knights in a game of chess can attack each other based on their position.
Note: Case 2 has 2 solutions
- index.js
- test.js with some modified code.