Syntax Error While Parsing Array Methods Javascript Map Es6