Podcast
Questions and Answers
What is the correct syntax for creating a JSON object?
What is the correct syntax for creating a JSON object?
- {'name': 'John', 'age': 30}
- {"name": "John", "age": 30}
- {'name': 'John', 'age': 30}
- {"name": "John", "age": 30}
Which data types can be stored in a JSON object?
Which data types can be stored in a JSON object?
- String, Float, Boolean, Array
- String, Number, Boolean, Array (correct)
- String, Number, Boolean, Date
- String, Integer, Boolean, Object
What is the purpose of JSON.stringify() in JavaScript?
What is the purpose of JSON.stringify() in JavaScript?
- To parse a JSON object
- To convert a string to a JSON object
- To validate a JSON object
- To convert a JSON object to a string (correct)
Flashcards are hidden until you start studying