Skip to content

Instantly share code, notes, and snippets.

@kou-yeung
Last active April 1, 2019 05:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kou-yeung/ee9564c9ec13bfb23257ffeac230c31c to your computer and use it in GitHub Desktop.
Save kou-yeung/ee9564c9ec13bfb23257ffeac230c31c to your computer and use it in GitHub Desktop.
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