How to create key value pair from an array? In other words, this.firstName means the firstName property of this object. Simple Array eg. Objects in JavaScript are standalone … In the bracket notation, we need to pass key as a string like object['year'] instead of just the identifier name object[year]. Any for loop will only result in 1 entry because the array only has one object.