Grouping Values Together with Objects and Arrays
Jonathan Bartlett · Apress eBooks · 2022
So far, while programming, we have basically been dealing with simple values, such as individual numbers and strings. However, when writing computer programs, you usually have to deal with multiple values grouped together. For instance, think about a bank transaction—what values would you need to store? You would need to know when the transaction happened, how much the transaction was for, who sent the money, and who received the money. Therefore, you would need, at minimum, four values—the timestamp of the transaction, the amount, the account number it was coming from, and the account number that it was going to.