obj = (function() {
currentValue = 7
return {
valueOf: function() { return currentValue = currentValue+2 }
}
})()
(obj < 10) && (obj > 10) //true
Last active
July 5, 2018 18:51
-
-
Save raorao/cedb7282c80e24328421 to your computer and use it in GitHub Desktop.
valueOf hackery.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment