1const x = true;
2var result = x === true ? "passed" : "failed";
3
4//Explanation
5//var 1.result = 2.x 3.=== 4.true 5.? 6."passed" 7.: 8."failed";
6//1.result
7//2.left side of if statement
8//3.if statement operator
9//4.right side of if statement
10//5.shorthand then operator
11//6.if true the result will be "passed"
12//7.shorthand else operator
13//8.if false the result will be "failed"