code_junkie

How are javascript arrays implemented?

Nov 12th, 2011
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. var sup = new Array(5);
  2. sup[0] = 'z3ero';
  3. sup[1] = 'o3ne';
  4. sup[4] = 'f3our';
  5. document.write(sup.length + "<br />");
  6.  
  7. a.length
  8. a['length']
  9. a.length = 4
  10. a['length'] = 5
  11.  
  12. a.length
  13. a['length']
  14.  
  15. a.length = 4
  16. a['length'] = 5
Add Comment
Please, Sign In to add comment