Write a statement using conditional/ternary operators to convert the
value of a variable d into absolute form.
Answers
Answered by
1
Answer:
function getFee(isMember) {
return (isMember ? '$2.00' : '$10.00');
}
console.log(getFee(true));
// expected output: "$2.00"
console.log(getFee(false));
// expected output: "$10.00"
console.log(getFee(null));
// expected output: "$10.00"
Run: > "$2.00"
> "$10.00"
> "$10.00"
Explanation:
Similar questions