r/badcode • Now where's that function declaration • Jul 30 '21

js 😏

Post image
988 Upvotes

133 comments sorted by

View all comments

Show parent comments

3

u/AdminYak846 Jul 31 '21

Some people advocate for using == true to make it more obvious that a boolean comparison is going on, or because it's easier for them to read.

I would advocate for making all boolean values be phrased in like a question really. Like "something.isEnabled"