Skip to content

Instantly share code, notes, and snippets.

/js modifier Secret

Created Sep 12, 2015
Embed
What would you like to do?
obj = {x:4 y:4}
obj2 = {x:1,y:1}
modifier = [function(){this.x += 1},function(){this.y -= 1}]
obj1.modifier = modifier
obj.modifier()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment