Arrays are like a set of primitive types that is used to store information in them in the form of numbers, strings, booleans etc. Arrays can be modified by adding or removing data.
let lottoNumbers = [1, 2, 3, 4, 5, 6];
Object literals are also like arrays except for the fact that data is stored in them with a key. Every primitive type data that is stored in them has a key assigned to it which can then be called out to display or modify that data.
let product = {
name: "Gummy Bears",
inStock: true,
price: 1.99,
flavors: ["grape","apple","cherry"]
}
Top comments (0)