javascript - Is there a way to check if an array holds more than one value? -


for example, if needed code have set of numbers in array list happen? example array [1,3,4,5,9]. there way check , see if array contained these integers @ once , in same order?

var arraysearch = function (subarray,array ) {     var = -1;     return subarray.every(function (v) {             if(i != -1) {                 i++;                 return (array.indexof(v) === i)             }             = array.indexof(v);             return  >= 0;     }); };  var arr = [1,3,4,5,9];  console.log(arraysearch([4,5],arr)) 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -