I have some code to make a Drag&Drop with Vanilla JS, and i have these functions:
function HandleDrop(e) {
var dt = e.dataTransfer;
var files = dt.files;
HandleFiles(files);
}
function HandleFiles(files) {
([...files]).forEach(UploadFile); // "UploadFile" is a function to make an Ajax call, is not important
}
"HandleDrop" is added to the "drop" event of a div and i don't understand what's the meaning of "([...files])". I tried to find in Google but the parentheses and square brackets aren't used for the search (google skip it).