I have a page that loads a HTMLCollection that consists of 1000 elements.
What I want to achieve is once the page is loaded, immediately after, I'd like that HTMLCollection to be shuffled. (I have no control on how I receive the data from the server)
I can't figure out the best way to do this. Should I copy the HTMLCollection into another temp variable, remove all items in the existing HTMLCollection (on the DOM), shuffle that temp and display it - in which case how does one remove HTMLCollection items?
Or is it possible to manipulate the HTMLCollection and DOM as it is - in which case how is that done?
I'd gather the HTML collection using this:
let allImageTiles = document.getElementsByClassName('locationImage');