if you plan on doing both levels, can you do level 2 first?
- Create a solution1.js source file.
- In solution1, create a function that takes in an array of student objects, and returns an array with each student in an order that follows the following rules. a. each student must move to a new position a. each student must move ta a position that is not a neghboring position of the original position (position 5 cannot move to position 4 or 6) a. each student must move to a position that is not next to either original neighboring positions (edges, 0 and 10 only have one neighbor)
- export the function as a module
- import the source file
students.js
- pass the array from
students.js
into your function and display the results.
- write tests that ensure that your function returns the desired results