Advertisement
Guest User

Untitled

a guest
Feb 24th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. var testArray = ["a","b","c"];
  2. console.log(testArray);
  3. console.log("size:" + testArray.length);
  4.  
  5. ["a", "b", "c"]
  6. size:3
  7.  
  8. var testArray = ["a","b","c"];
  9. console.log(testArray);
  10. console.log("size:" + testArray.length);
  11. testArray = testArray.splice(0,1);
  12.  
  13. ["b", "c", undefined × 1]
  14. size:3
  15.  
  16. var testArray = ["a","b","c"];
  17. console.log(testArray);
  18. console.log("size:" + testArray.length);
  19. testArray = testArray.splice(0,1);
  20. console.log(testArray);
  21. console.log("size:" + testArray.length);
  22.  
  23. ["b", "c", undefined × 1]
  24. size:3
  25. ["a"]
  26. size:1
  27.  
  28. var testArray = ["a","b","c"];
  29. console.log(testArray);
  30. console.log("size:" + testArray.length);
  31. testArray.splice(0,1);
  32. console.log(testArray);
  33. console.log("size:" + testArray.length);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement