How do you print an array in HTML?
The easiest way to print out an array is to use the console. log() function. You can loop through each element, printing it out one by one.
How do you duplicate an array?
To duplicate an array, just return the element in your map call. numbers = [1, 2, 3]; numbersCopy = numbers. map((x) => x); If you'd like to be a bit more mathematical, (x) => x is called identity.