let i = [5, 6, 7];
let j = [5, 6, 7];
console.assert(i === j, "Not the same values");
Will throw an error even if arrays contain the same values, how do you do a quick console.assert() to check if two arrays contain the same values?
let i = [5, 6, 7];
let j = [5, 6, 7];
console.assert(i === j, "Not the same values");
Will throw an error even if arrays contain the same values, how do you do a quick console.assert() to check if two arrays contain the same values?
console.assert(i.toString() === j.toString(), "Doesn't match");
Will assert true, and is one way to compare values in two arrays using console.assert();