VL
https://codepen.io/Vitalijs/pen/xxqXMpo
Size: a a a
VL
🔪
VL
L
L
VL
L
AB
C
ДА
ДА
for (let index = 0; index < arr1.length; index++) {
const element = arr1[index]
const element2 = arr2[index]
if (element1 !== element2)
return false
return true
}
ЛХ
const array1 = ["yellow", "blue", "green"]
const array2 = ["yellow", "red", "blue"]
for (const index in array1) {
if (arr1[index] === arr2[index]) {
return true
}
}
AP
AA
const array1 = ["yellow", "blue", "green"]
const array2 = ["yellow", "red", "blue"]
array1
.every((el, i) => el === array2[i])ЛХ
AA
AA