Unexpected token, expected "," (174:4)
时间: 2023-09-06 16:14:55 浏览: 88
Unexpected token c in JSON at position 0 报错信息及解决
5星 · 资源好评率100%
This is a syntax error that occurs when the parser encounters an unexpected token and expects a comma instead. The error message indicates the line number and the position where the error occurred.
For example, if you have the following code:
```
const myArray = [1 2 3];
```
You will get the error message:
```
SyntaxError: Unexpected token, expected "," (1:11)
```
This is because there are no commas separating the elements of the array. To fix the error, you need to add commas:
```
const myArray = [1, 2, 3];
```
阅读全文