In VueJS you can loop through an array like this : const array1 = ['a', 'b', 'c'];
Array.from(array1).forEach(element =>
console.log(element)
);
in my case I want to loop through files and add their types to another array:
Array.from(files).forEach((file) => {
if(this.mediaTypes.image.includes(file.type)) {
this.media.images.push(file)
console.log(this.media.images)
}
}