Answer the question
In order to leave comments, you need to log in
Why is the string not being parsed into JSON?
JSON.parse(["day 1","day 2", "day 3", "day 4"])
//VM48341:1 Uncaught (in promise) SyntaxError: Unexpected token d in JSON at position 0
Answer the question
In order to leave comments, you need to log in
You are passing an array, but you need to pass a string. Learn the data types in JavaScript so you don't get it wrong again.
https://learn.javascript.ru/types
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question