JavaScript Variable coercion/conversion Converting a number to a boolean

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!


Boolean(0) === false

Boolean(0) will convert the number 0 into a boolean false.

A shorter, but less clear, form:

!!0 === false

Got any JavaScript Question?