For some reason I can't seem to find where by syntax error would be in this Lodash function. Does anyone know where I'm going wrong here?
const classes = _.filter(state.classes, class => {
return class.date === moment()
});
Here is the error I'm seeing (using React Native):
The particular position it is referring to (64:49) is after the class
on the first line.
class
is a keyword . Keywords cannot be used as variable names. Use a different name for the parameter.
尝试为函数参数使用其他名称, class
是保留关键字:D
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.