I'm trying to compare two arrays.
firstArray has 451 integers in it, secondArray has 91 integers in it.
All integers that are in secondArray are also in firstArray.
I want to log out the integers from firstArray that are not in secondArray.
I tried the following :
for (let i = 0; i < firstArray.length; i++) {
for (let j = 0; j < secondArray.length; j++) {
if (firstArray[i] !== secondArray[j]) {
console.log(firstArray[i])
} } }
But it returned all 451 integers from the firstArray where I expected it to return 360 integers (firstArray - secondArray)
It's my first time posting here, hope it's clear enough ahah.