I'm developing an annual permit calculator for work. I have to detect legal holidays. So I add all the legal holidays in my array. If date is equal to other array, it should return true. But the code says these two objects below are not equal. I couldn't figured out why.
var legalHolidays = [[1, 1, 2019], [23, 4, 2019], [1, 5, 2019], [19, 5, 2019], [3, 6, 2019]]
var otherArray = [1, 1, 2019]
if (legalHolidays[0] == otherArray) {console.log(true)}else{console.log(false)}
I expect the output of false to be true.