Syntax Error While Parsing Array Methods Javascript Map