Is there i way in JavaScript to compare two arrays;
This is my example.
array1 = ['jpg','png'];
array 2 = ['jpg','pdf','png','bmp'];
I my case i need if are all elements of array1 part of array2 return TRUE, or something. In case only one element of array 1 match, element in array 2 return FALSE. Order its not important. Basciclly this is validation of uploaded files, i try to removing button, if two file are not with right extension.
I try function inarray, but i think it only works with string not array