Skip to content

Instantly share code, notes, and snippets.

@suzukimilanpaak
Created February 12, 2016 06:47
Show Gist options
  • Save suzukimilanpaak/4fe1d24fe318e05a4d78 to your computer and use it in GitHub Desktop.
Save suzukimilanpaak/4fe1d24fe318e05a4d78 to your computer and use it in GitHub Desktop.
bindの動作
var classExample = {
binded: function(){ console.info(this) }.bind(this),
unBinded: function(){ console.info(this) }
}
classExample.binded();
// => Window {external: Object, chrome: Object, document: document, React: Object, ReactDOM: Object…}
classExample.unBinded();
// => Object { binded: function(){ console.info(this) }.bind(this), unBinded: function(){ console.info(this) }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment