I came across this variable structure which reminded me of ternary if condition
const exp = x ? y : z;
can you give me some guidance about it ?
/////
>Solution :
exp will be assigned to y if x evaulutes to true, otherwise z.
if (x) const exp = y;
else const exp = z;
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator