Skip to content

Instantly share code, notes, and snippets.

@jhirn
Last active May 8, 2017 18:19
Show Gist options
  • 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