Remember that functions are mappings from values from a domain, into values from a codomain. A language whose treatment of compound values is as feeble as JavaScript's can't possibly constitute the right foundation for doing functional programming.
Eg in Haskell, whether things can be compared for equality depends on their representation. (Eg church encoded datatypes do not lent themselves to the built-in derivation of the == operator.)
Have fun doing that in JavaScript. Have fun making objects/hashtables use your custom equality operator when comparing field names. Have fun making sure that every single part of your program respects the notion of equality defined by your custom equality operator.
> Eg in Haskell, whether things can be compared for equality depends on their representation.
In any higher-order langauge, that's a feature, not a bug.
OTOH, a Haskeller can reason about Haskell programs by just evaluating Haskell expressions.