What you want is to find a value in an array.
You can use includes
const array = ["23435","87567", "34536","45234","34532","65365"]
const aConstant = "23435"
return (<div>{ array.includes(aConstant) ? 'a' : 'b' }</div>)
Same thing with indexOf
const array = ["23435","87567", "34536","45234","34532","65365"]
const aConstant = "23435"
return (<div>{ array.indexOf(aConstant) !== -1 ? 'a' : 'b' }</div>)
You can also try filter
const array = ["23435","87567", "34536","45234","34532","65365"]
const aConstant = "23435"
return (<div>{ Boolean(array.filter( x => x === aConstant)) ? 'a' : 'b' }</div>)
And even find
const array = ["23435","87567", "34536","45234","34532","65365"]
const aConstant = "23435"
return (<div>{ array.find( x => x === aConstant) ? 'a' : 'b' }</div>)
CLICK HERE to find out more related problems solutions.