Functional JS. Close #7