JS Coding Questions Logo
JS Coding Questions
#149💼 Interview💻 Code

How do you define JSON arrays

Advertisement

728x90

JSON arrays are written inside square brackets and arrays contain javascript objects. For example, the JSON array of users would be as below,

javascript
1"users":[
2  {"firstName":"John", "lastName":"Abrahm"},
3  {"firstName":"Anna", "lastName":"Smith"},
4  {"firstName":"Shane", "lastName":"Warn"}
5  ]

Advertisement

Responsive Ad
🎯 Practice NowRelated Challenge

JavaScript Coding Exercise 64

Test your knowledge with this interactive coding challenge.

Start Coding

Advertisement

728x90
149of476