X = 1 // Now, the object that was originally in 'x' has a unique reference // embodied by the 'y' variable. ![]() let y = x // The 'y' variable is the second thing that has a reference to the object. Obviously, none can be garbage-collected. The other is referenced by virtue of being assigned to the 'x' variable. One is referenced by the other as one of its properties.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |