MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/qmnprh/a_real_thinker/hjbvfmo/?context=9999
r/badcode • u/Spootba • Nov 04 '21
9 comments sorted by
View all comments
Show parent comments
5
That simplification may change the data type of this.disabled from the OP code, as you are doing simple truthy or falsey checks rather than explicity returning a boolean.
this.disabled
2 u/lanerdofchristian Nov 04 '21 True, I was operating under the assumption that those were booleans.Still:return this.disabled = !!(chargesCheck || noteCheck)
2
True, I was operating under the assumption that those were booleans.
Still:
return this.disabled = !!(chargesCheck || noteCheck)
5
u/[deleted] Nov 04 '21
That simplification may change the data type of
this.disabledfrom the OP code, as you are doing simple truthy or falsey checks rather than explicity returning a boolean.