console.log(restaurant.openingHours[tue] ? .open); on saving I get a gap between . and ? as seen above. The on console this is the error. Uncaught SyntaxError: Unexpected token '.'
Try removing the spaces between . and ?.
.
?
console.log(restaurant.openingHours[tue] ? .open); //Error: expected expression, got '.' console.log(restaurant.openingHours[tue]?.open); // Evaluates expression
The error occurs when I save the file.
"eslint.autoFixOnSave": true,
the above code seems to be deprecated. kindly assist.
Can you disable ESLint? ESLint may be causing the error.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
console.log(restaurant.openingHours[tue] ? .open);
on saving I get a gap between . and ? as seen above.
The on console this is the error.
Uncaught SyntaxError: Unexpected token '.'
Try removing the spaces between
.
and?
.The error occurs when I save the file.
"eslint.autoFixOnSave": true,
the above code seems to be deprecated.
kindly assist.
Can you disable ESLint? ESLint may be causing the error.