Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react js if statement

if (coinToss() === 'heads') {
  img = <img src={pics.kitty} />
} else {
  img = <img src={pics.doggy} />
}
Source by reactjs.org #
 
PREVIOUS NEXT
Tagged: #react #js #statement
ADD COMMENT
Topic
Name
6+2 =