When I create two identical JavaScript Date objects and then compare them, it appears that they are not equal. How to I test if two JavaScript dates have the sa
Date
I compare many kinds of values in a for loop, so I wasn't able to evaluate them by substracting, instead I coverted values to string before comparing
var a = [string1, date1, number1] var b = [string2, date2, number2] for (var i in a){ if(a.toString() == b.toString()){ // some code here } }