Skip to content

Instantly share code, notes, and snippets.

@rahgurung
Created December 4, 2021 16:44
Show Gist options
  • Save rahgurung/7b076d4928ca3563ba9994e8d2b34ed1 to your computer and use it in GitHub Desktop.
Save rahgurung/7b076d4928ca3563ba9994e8d2b34ed1 to your computer and use it in GitHub Desktop.
function doSomething() {
return this.a;
}
var x = doSomething.bind({a: 'Hello World!'});
console.log(x()); // Hello World!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment