Complete the function
// returns "yes" if n is positive, otherwise "no"
function label(n: number): string {
return n > 0 ____ "yes" : "no";
}
Answer: ?
The ternary operator uses ? before the truthy branch.
Play Problem Solving ▸
// returns "yes" if n is positive, otherwise "no"
function label(n: number): string {
return n > 0 ____ "yes" : "no";
}
Answer: ?