Created
January 25, 2018 04:19
-
-
Save manjufy/ca9bbc996ae13bd505a81d9aec8a7dc6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = | |
{ | |
toString: function() | |
{ | |
return "foo"; | |
}, | |
valueOf: function() { | |
return 42; | |
} | |
}; | |
window.console.log ("x="+x); | |
window.console.log ("x="+x.toString()); | |
// prints | |
// x=42 | |
// x=foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment