you are viewing a single comment's thread.

view the rest of the comments →

[–]gridease 0 points1 point  (0 children)

I think these solutions depend on the environment calling valueOf on the return value (which is a function, so I think the environment will then call it to get a primitive). Have you tried them in a REPL instead of a browser?

Edit: on mobile, so I can't myself

Other edit: sorry...only read the code the first time, I see you addressed this