Ternary

Syntax for if statement

const showComments = true;
{showComments ? 'yes' : 'no'}

If showComments is true, yes, else no

Was this page helpful?