JS1 Homework Rearranged