How can I make two JavaScript references point to the same object?

0
2
Asked By MellowCedar42 On

I'm trying to understand whether JavaScript supports pointer-like behavior. My original problem is that I'm using `Object.assign(map.get(key), value)`, and although `map.get(key).start === value.start` returns `true`, `map.get(key) === value` returns `false`. How can I make the object stored for `key` be the exact same object as `value`?

0 Answers

There is no answer to this question yet. If you know the answer or can offer some help, please use the form below.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.