You compare two objects with < , <= , and they are actually compared with a string that they could hide.
"function a(){}" < "function a(){}" is false.
"function a(){}" <= "function a(){}" true.
EDIT: Why (function a(){}) == (function a(){}) returns false because you are comparing the same type with == , so they donβt need to hide a string or number to compare, they are two different objects .
source share