I got an interesting warning message from IntelliJ about some JavaScript code:
((a === 'foo') || (a === 'bar')) ? true : false' can be simplified to '!!(((a === 'foo') || (a === 'bar')))
I see why the structure condition ? true : false
doesn't make sense, but shouldn't the condition itself represent a boolean value? So why should I use the double negation for the whole expression?