How is undefined treated in Binary in javascript?
It throws error when I do (undefined).toString(2).
But when I do
undefined & 0 //returns 0
undefined & 1 //returns 0
undefined | 0 //returns 0
undefined | 1 //returns 1
One might guess that undefined might be converted into 0 . Or Is there any other thing going ?