Comparing values in JavaScript is one of the most common tasks. Yet, there are a lot of different details to bear in mind when doing so. This collection contains comprehensive explanations of the issues you may face and how to best work around them in your code.
JavaScript, Type
Learn all you need to know about the differences between JavaScript's double equals and triple equals operators.
JavaScript, Type
Did you know there's a JavaScript value that's not equal to itself?
JavaScript, Object
Learn how you can compare two objects in JavaScript using various different techniques.
JavaScript, Array
Learn how you can compare two arrays in JavaScript using various different techniques.
JavaScript, Date
Learn how you can compare two dates in JavaScript using various different techniques.
JavaScript, Object
Performs a deep comparison between two values to determine if they are equivalent.
JavaScript, Object
Compares two objects to determine if the first one contains equivalent property values to the second one.
JavaScript, Object
Compares two objects to determine if the first one contains equivalent property values to the second one, based on a provided function.
JavaScript, Array
Checks if two arrays contain the same elements regardless of order.
JavaScript, Date
Checks if a date is the same as another date.