InterviewSolution
Saved Bookmarks
| 1. |
What is the purpose of the method JSON.parse()?(a) Parses a string to integer(b) Parses a string to JSON(c) Parses a string from JSON to JSON2(d) Parses integer to stringI have been asked this question in an interview for job.I'd like to ask this question from Parsing Values using JavaScript in section Parsing, Benchmarking and Logging of JavaScript |
|
Answer» CORRECT ANSWER is (b) Parses a string to JSON Best explanation: The JSON.parse() method parses a string as JSON, optionally transforming the VALUE PRODUCED by parsing. The function parseInt() method parses a string and returns an INTEGER. |
|