Skip to content
Quiz · Narrowing · lesson 4 of 12

Quiz — zero in a condition

What does the program print?

TypeScript
function show(count: number | null) {
    if (count) {
        return "yes";
    }
    return "no";
}

console.log(show(0), show(-1));