Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = [1, 2, 3]
- // Prints using the default representation
- console.log(a)
- // Try to override toString
- a.toString = function () {
- return 'some new representation'
- }
- // Still uses the default representation
- console.log(a)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement