1(condition ? doIfTrue : doIfFalse)
2//exemple :
3function getFee(isMember) {
4 return (isMember ? '$2.00' : '$10.00');
5}
6console.log(getFee(true));
7// expected output: "$2.00"
8console.log(getFee(false));
9// expected output: "$10.00"
10console.log(getFee(null));
11// expected output: "$10.00"
1isMember ? '$2.00' : '$10.00'
2// isMember true => output: "$2.00"
3
4// isMember false => output: "$10.00"
5
6// isMember null => output: "$10.00"