For example: I have key1 = "abc" and key2="xyz".
I want to write a function that will return the same value regardless of the order of parameters.
So foo(key1, key2) and foo(key2, key1) should both the same value ex. "123".
I am thinking of some kind of hashing, but not quite sure what's the best approach to make this as efficient as possible.
Would appreciate any ideas, I am implementing it in javascript/node.js