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 react-cn.github.io #
 
PREVIOUS NEXT
Tagged: #react #js #statement
ADD COMMENT
Topic
Name
4+4 =