什么原因導致第三行出現此錯誤?var products = [{ "name": "Pizza", "price": "10", "quantity": "7"}, { "name": "Cerveja", "price": "12", "quantity": "5"}, { "name": "Hamburguer", "price": "10", "quantity": "2"}, { "name": "Fraldas", "price": "6", "quantity": "2"}];console.log(products);var b = JSON.parse(products); //unexpected token o打開控制臺以查看錯誤
Uncaught SyntaxError:帶有JSON.parse的意外標記
阿晨1998
2019-08-31 11:09:33