Skip to content

Instantly share code, notes, and snippets.

@jhirn
Last active May 8, 2017 18:19
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 jhirn/6220e9e6eb44f5133a797040266320e3 to your computer and use it in GitHub Desktop.
Save jhirn/6220e9e6eb44f5133a797040266320e3 to your computer and use it in GitHub Desktop.
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