In javaScript, such situation will happen, I want to know why ?
1 == {} //false {} == 1 //throw a Error
It's just a syntactic limitation. ({}) == 1 works just fine.
({}) == 1