functional javascript Part1