Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "Which expression uses `fallback` only when `count` is `null` or `undefined`, while preserving `0`?" on CodeWiki (https://codewiki.com/practice/mcq/javascript/checkpoint-1/checkpoint-1-nullish-fallback/).
Context (verbatim from the page):
"""
Which expression uses `fallback` only when `count` is `null` or `undefined`, while preserving `0`?
`count ?? fallback`
`count || fallback`
`Boolean(count) && fallback`
"""
Introduce three subtle bugs into the example above and let me find them. Reveal each answer only after I have guessed.
Answer in English. Keep code examples in JavaScript. Where you are unsure, say so.