Regardless of what you attitude is with lodash these days I will make this post also about Same Value Zero in general so that this is not just a post on lodash eq alone.
So when comparing two values there is the equality operator and then the identity operator. I will not be getting into detail about two two different operators when it comes to finding out if two value are equal or not here, as I have wrote a blog post on the equality and identity operators before hand. However I will say that these to operators do the same thing which is comparing two values to see if they are equal, but they do so in very different ways. In addition because they preform equality in very different ways they will not always return true and false for the same set of values in some certain situations.
So the lodash eq method is yet another way of comparing two values to see if they are equal, but it also follows a different way of determining equality. For example the lodash eq method will return true even when comparing two values that are NaN, something that will result in a false value for equality and identity.