Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
function as key of Map
node v10.24.1
version:
1.0.1
endpoint
share
tweet
function a() { return "abc" } function b() { return 123 } function wrap(f) { return () => f() } var wa = wrap(a) var wb = wrap(b) wa === wb
Object.is(wa, wb)
var m = new Map() m[wa] = "hello, world!" m[wb]
Loading…
no comments
sign in
to comment