JavaScript compares objects by reference, not by content. Even if two arrays look identical, they live in different memory locations. The Map sees them as different keys. Here are three ways to solve ...