Clarify "falsy" values
See original GitHub issuehttps://vuejs.org/v2/guide/syntax.html#Attributes
It also works for boolean attributes - the attribute will be removed if the condition evaluates to a falsy value
In fact, binding an attribute to 0
or NaN
won’t result in removing the attribute. It’s not a normal case but the doc should be more precise on this IMO.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Clarify "falsy" values · Issue #1250 · vuejs/v2.vuejs.org · GitHub
Clarify "falsy" values #1250 ... It also works for boolean attributes - the attribute will be removed if the condition evaluates to a...
Read more >The Semantics of Falsy Values - DEV Community
In this article, I explain the semantics behind these values so that we can be better informed about their proper usage.
Read more >Falsy Values in JavaScript - freeCodeCamp
A falsy value is something which evaluates to FALSE, for instance when checking a variable. There are only six falsey values in JavaScript: ......
Read more >How Truthy and Falsy Values in JavaScript Work
Falsy values are values that evaluate to false when JavaScript “converts” them to their Boolean alternatives. First, let's take a look at values ......
Read more >What Are Truthy and Falsy in JavaScript
In JavaScript one of the primitive types is boolean. A boolean is a value that is either true or false. Additionally, every other...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed!
I see. Thanks!