Advertisement
vojd

javascript - array fail

Mar 8th, 2012
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <script>
  4. var apa = [];
  5. console.log(apa);
  6. apa.push('a');
  7. apa.push('a');
  8. apa.push('a');
  9.  
  10. for (i=0; i<10; i++) {
  11.     apa.push(i);
  12. }
  13. </script>
  14. </head>
  15. </html>
  16.  
  17. // in chrome
  18. // ["a", "a", "a", 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  19.  
  20. // in firefox
  21. // []
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement