Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

Falsy Check

node v18.11.0
version: 1.0.0
endpointsharetweet
const features = {} console.log(`undefined ${!features.foo ? 'block' : 'none'}`) features.foo = false console.log(`false ${!features.foo ? 'block' : 'none'}`) features.foo = "" console.log(`empty ${!features.foo ? 'block' : 'none'}`) features.foo = true console.log(`true ${!features.foo ? 'block' : 'none'}`) features.foo = {} console.log(`defined ${!features.foo ? 'block' : 'none'}`)
Loading…

no comments

    sign in to comment