function isEqual(a, b){ return a.join() == b.join(); } let a = ['J','a','v','a']; let b = ['s','c','r','i','p','t']; console.log(isEqual(a, b)); //false