Last active
April 30, 2018 16:38
-
-
Save gladchinda/1f09c1bbd8050f0b45f8ede1ad6c334c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// METHOD 1: Using if statement | |
if (person) { | |
fetchProfile(person); | |
} | |
// METHOD 2: Using short-circuiting | |
person && fetchProfile(person); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment