1
const a = 'a'
const b = [a]
a === b[0] // true

is a and b[0] has different address? i learned === only compare value and values type copy of primitive type in javascript is deep copy

i want know === is compare real memory address?? and is there any way can get a memory address in javascript??

i tried to find way but i can't

please let me know your wise have a nice day!!

정우병
  • 121
  • 2
  • 4
  • Why? What purpose would it serve? – Phil Apr 07 '22 at 01:17
  • look these answers: - https://stackoverflow.com/questions/50530936/is-there-any-method-to-check-memory-address-of-javascript-variable - https://stackoverflow.com/questions/21457644/how-to-know-that-two-javascript-variable-point-to-the-same-memory-address – learango Apr 07 '22 at 02:02

0 Answers0