Skip to content

Instantly share code, notes, and snippets.

@nottombrown
Created February 8, 2012 19:32
Show Gist options
  • Save nottombrown/1772691 to your computer and use it in GitHub Desktop.
Save nottombrown/1772691 to your computer and use it in GitHub Desktop.
myState = "external state"
TestModel = Backbone.Model.extend
initialize: (options) ->
@myState = "internal state"
printState: =>
console.log @myState
$ ->
model = new TestModel()
model.printState() # --> undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment