Skip to content

Instantly share code, notes, and snippets.

@thatkookooguy
Created January 9, 2017 12:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thatkookooguy/29a3d8aabbf5e5f362da693389e43630 to your computer and use it in GitHub Desktop.
Save thatkookooguy/29a3d8aabbf5e5f362da693389e43630 to your computer and use it in GitHub Desktop.
var variables = {Set number(num) { number = num; } get number() { return rand(); } }
Vaiables.number = 5;
Cosole.log(vrlariables.number === variables.number);
@ortichon
Copy link

ortichon commented Mar 8, 2017

var variables = { set number(value) { this._number = value; }, get number() { return Math.random(); } }

variables.number = 5;

console.log(variables.number === variables.number);
console.log(variables);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment