Skip to content

Instantly share code, notes, and snippets.

@hbbio
Created September 14, 2012 17:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hbbio/3723280 to your computer and use it in GitHub Desktop.
Save hbbio/3723280 to your computer and use it in GitHub Desktop.
// convenient printer
pp = function(x) { Debug.jlog("{x}") }
a = { name: "John", surname: "Doe" }
pp(a.name)
a = { a extend age: 33 }
pp(a.age)
b = {name: "Mary"}
f = function(x) { x.name }
pp(f(a))
pp(f(b))
// following code does NOT compile (on purpose)
c = { foo: "bar" }
pp(f(c))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment