SHARE
TWEET

Untitled

a guest Apr 21st, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
Top