Skip to content

Instantly share code, notes, and snippets.

@shabaz-ejaz
Created September 26, 2017 08:47
Show Gist options
  • Save shabaz-ejaz/2a945d700d9ef14d3f18f8d0a5fbca03 to your computer and use it in GitHub Desktop.
Save shabaz-ejaz/2a945d700d9ef14d3f18f8d0a5fbca03 to your computer and use it in GitHub Desktop.
Immediately invoked function expressions
{(() => {
switch (this.state.color) {
case "red": return "#FF0000";
case "green": return "#00FF00";
case "blue": return "#0000FF";
default: return "#FFFFFF";
}
})()}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment