How can I solve this problem?
..An array of integers is given. Check if it contains the same elements. Maybe my idea is right, but I don't know how I can do this. One more thing. I can use Loops, but without ForEach, function, and something similar. Thank you.
let array = [2, 4, 3, 0, 1];
let array2 = [2, 4, 3, 0, 1];
for (let b = 0; b < array2.length; b ++) {
for (let i = 1; i < array.length; i ++) {
if (array2[b] == array[i]) {
console.log('there are');
} else {
}
}
}