-
-
Save kou-yeung/ee9564c9ec13bfb23257ffeac230c31c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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