Both variables point to the same memory. The engine can do this safely because strings in JavaScript are immutable — since you can never modify a string in place, sharing the underlying data is always ...
🚀 JAVASCRIPT MYTH: const means "completely immutable" 🚀 Many developers starting with JavaScript assume that declaring an array with const locks it down completely.