Arrays in Javascript
· ☕ 6 min read
Array is a collection of elements or objects, and is quite easy to use in Javascript.
Here’s an example of array:
1 const fruits = ["apple", "orange"]; You can print out the entire array..
1 2 const fruits = ["apple", "orange"]; console.log("fruits: ", fruits); //fruits: [ 'apple', 'orange' ] .