I have this code here inside the return section in React-
this.state.paymentoptions.map((x)=>(
<div><button style={{marginLeft:'10px'}}>{if(x.method!=online){x.method}}</button><br></br></div>
))
Here I am trying to use if inside the map. But its giving me Unexpected token. How to fix this?