Skip to main content

Gist 4045352

✓ Published0🌍 Public
Aallyraza
Last edited Nov 9, 2012
Created on Nov 9, 2012

This example demonstrates how JavaScript object references work through a simple assignment test. It creates an object called `entity` with a `company` property, assigns it to a new variable `newEntity`, then modifies the `company` value through that new variable. The console output shows that both `newEntity.company` and `entity.company` return the updated string, proving that both variables point to the same in-memory object. No external libraries are used; the code relies solely on native JavaScript object semantics and the `console.log` API.

AI-generated description