fightResolve = (a, b) =>{
const arr = [a.toLowerCase(),b.toLowerCase()]
console.log(arr === ['a','s'])
}
fightResolve('a','S')
fightResolve = (a, b) =>{
const arr = [a.toLowerCase(),b.toLowerCase()]
console.log(arr.join() === ['a','s'].join())
}
fightResolve('a','S')
fightResolve = (arr1, arr2) => {
return JSON.stringify(arr1).toLowerCase() === JSON.stringify(arr2).toLowerCase()
}
console.log(fightResolve(['a,b'], ['a', 'b']))
function isEquals(arr, arr2){
if(arr.length != arr2.length) return false
var on = 0;
for( var i = 0; i < arr.length; i++ ){
for( var j = 0; j < arr2.length; j++ ){
if(arr[i] === arr2[j]){
on++
break
}
}
}
return on==arr.length ? true : false
}
fightResolve = (a, b) =>{
const arr = [a.toLowerCase(),b.toLowerCase()]
console.log(isEquals(arr, ['a','s']))
}
fightResolve('a','S')