+ 2
JavaScript
(O) => (O) <= (O) what is this doing ??? compiles with no errors )
3 Answers
+ 1
Nothing. => is an operator in JavaScript, but <= is not.
+ 1
Sorry, I thought this was an emoji, but it's just ES6. In a more readable form it's something like
(function (O) {
return O <= (O)
})()
And closer to full-on crazy ES6
(O) => {
return O <= (O)
}
So, it's immediately executing and returning a Boolean value based on comparing O to itself (if this is the actual code), but not returning to anything so the value is just ignored.
0
but itâs compiling without any errors