Last active
May 8, 2017 18:19
-
-
Save jhirn/6220e9e6eb44f5133a797040266320e3 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
function NumberDescriber(props) { | |
let description; | |
if (props.number % 2 == 0) { | |
description = <strong>even</strong>; | |
} else { | |
description = <h2>odd</h2>; | |
} | |
return <div>{props.number} is an {description} number</div>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment