What JSON construct is represented on line 4?
Choose an answer
Tap an option to check your answer.
Correct answer: object.
Why this is the answer
Line 4, { "name": "Alice", "age": 30 }, represents a JSON object. In JSON, an object is an unordered collection of key-value pairs, enclosed in curly braces {}. Each key must be a string, and keys are separated from values by a colon :. Key-value pairs are separated by commas ,. An array is an ordered list of values, enclosed in square brackets []. A key is the string identifier within an object, like "name" or "age". A value is the data associated with a key, such as "Alice" or 30.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed