SyntaxFix
Write A Post
Hire A Developer
Questions
You can do it as simple as this, I did it in react hooks :
(myNumber == 12) ? "true" : "false"
it was equal to this long if function below :
if (myNumber == 12) { "true" } else { "false" }
Hope it helps ^_^