const stringKey = new String("key1"); const wm3 = new WeakMap([ stringKey, "val1" ]); console.log(wm3.get(stringKey)); // "val1"