Skip to content

Instantly share code, notes, and snippets.

@kou-yeung kou-yeung/function_bind.js Secret
Last active Apr 1, 2019

Embed
What would you like to do?
const str = "STR";
const func = function() {
switch(this)
{
case str: console.log(str);break;
default: console.log("default!!!");break;
}
};
func.bind(str)();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.