Advertisement
Guest User

Untitled

a guest
Apr 21st, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. a = [1, 2, 3]
  2.  
  3. // Prints using the default representation
  4. console.log(a)
  5.  
  6. // Try to override toString
  7. a.toString = function () {
  8. return 'some new representation'
  9. }
  10.  
  11. // Still uses the default representation
  12. console.log(a)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement