SpinTheMic
Pro

Explain it in 60 seconds

Truthy and falsy values

Frontend Engineering · JavaScript Core · Beginner

What are truthy and falsy values in JavaScript?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Falsy: false, 0, -0, 0n, "", null, undefined, NaN.
  • Everything else truthy (including "0", [], {}).
  • Used in conditions and logical operators.
  • Bugs with 0 or empty string.
  • Use ?? when 0/"" are valid.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics