Assignment 6. Functional javascript. #7