News for hackers. Stuff that matters.
Re:JavaScript Equality Minesweeper by paradite on Monday September 17, 2018 @07:17AM (#18004821)
People who writes `if(value)`
Re:JavaScript Equality Minesweeper by blauditore on Monday September 17, 2018 @07:41AM (#18004914)
But that's not the same; it's about truthy-ness. E.g. -1 and 1 are both truthy, but not loosely equal.
Re:JavaScript Equality Minesweeper by paulintrognon on Monday September 17, 2018 @08:04AM (#18005044)
That's weird, I would thought that if(value) was the equivalent of if(value == true). Learned something today!
Re:JavaScript Equality Minesweeper by pythonaut_16 on Monday September 17, 2018 @03:29PM (#18009168)
You can force cast a boolean by doing if(!!value == true) {}, but at that point you might as well just say if(value)
Re:JavaScript Equality Minesweeper by paradite on Monday September 17, 2018 @07:45AM (#18004940)
You are right. I confused truthy-ness with '== true' for some reason, didn't write much JS lately.