[Discussion] Strange piece of logic
See original GitHub issueat lib/components/breadcrumb.vue found this piece of logic:
if (item.active !== true && item.active !== false) {
item.__active = item === last;
} else {
item.__active = item.active;
}
Can somebody explain me why to use such complex statement?
item.active !== true && item.active !== false
=> true when item.active undefined or null?
item.active !== true && item.active !== false
=> false when item.active is set ?
why dont just use item.active == null
instead?
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
What makes logic 'strange'? - Quora
There is no logic reason,no explanation,no alternative. They build ideas and beliefs up inside their head as to what they see or hear...
Read more >Weekly Discussion: Logic and Thought : r/philosophy - Reddit
Just as a reminder, there's a schedule for upcoming weekly discussions here . Logic and Thought# In this post, I'm going to…
Read more >8 Logical Fallacies That Mess Us All Up - Mark Manson
8 Logical Fallacies That Mess Us All Up · 1. Correlation Is Not Causation · 2. Slippery Slope Fallacy · 3. False Dichotomies...
Read more >Strange comicvine logic - Gen. Discussion - GameSpot
A character might be able to lift and toss cars with ease and yet people will say he is weak and cannot punch...
Read more >A Strange Bit Of Logic | Page 3 | Speak EV - Electric Car Forums
When I bought my EV, I was driving a 13 year old VW Golf that needed about $1500 worth of work to keep...
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
Hm, so its all about ESLint… and found another intersting resource https://jsperf.com/comparison-of-comparisons
so what’s wrong with my example? )))))) Im not the guru of JS, so it will be good to know my mistakes