Error in 11/16


#1


https://www.codecademy.com/en/courses/react-101/lessons/react-jsx-advanced/exercises/jsx-conditionals-ternary?action=resume

Your ternary operator should look like coinToss() == 'heads' ? 'kitty' : 'doggy'


var img = <img src={pics[coinToss() == 'heads' ? 'kitty ' : 'doggy']} />;

I do not know what's the error.


#2

var img = <img
src={pics[coinToss()=='heads' ? 'kitty' : 'doggy' ]} />;


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.