Are you first timer at Why not join us and start exchange your programming knowledge with everyone. Register today!

React condition - if string value of variable == 'this', do this

+1 vote
added Aug 19, 2021 in React by lcjr First Warrant Officer (8,030 points)
<!--Originally show this-->
<span>{agentID}</span> */}

<!--if string value of variable == 'hide me', shows 'none'-->
<span>{(agentID==='hide me') ? "none" : agentID }</span>


Please log in or register to response this reference. - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.