I was going through some JavaScript code online and came across this notation that I don't understand:
const selectedSeats = document.querySelectorAll('.row .selected');
const seatsIndex = [...selectedSeats].map(seat => [...seats].indexOf(seat));
I am not quite sure about the three dot notation: I don't understand what the three dots in [...selectedSeats] are for or what they mean, and likewise with [...seats].
If anybody could explain this to me, it'd be very appreciated since I wasn't able to find much information online on the topic. Thank you so much in advance.