shift_unshift_es5.baseline 519 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. 0,1,2,3
  2. 1,2,3
  3. 1,2,3
  4. 4
  5. 0,1,2,3
  6. a,b,c,0,1,2,3
  7. 1
  8. 1
  9. 2
  10. 2
  11. 1
  12. 3
  13. undefined
  14. 0
  15. 3
  16. 2
  17. 4
  18. 5
  19. 5
  20. 5
  21. 6
  22. 7
  23. 2
  24. 3
  25. undefined
  26. undefined
  27. 0
  28. 3
  29. 3
  30. 3
  31. --- unshift 0
  32. 3
  33. 100,101,102
  34. --- unshift 1
  35. RangeError : Array length must be assigned a finite positive integer
  36. length: 4294967295
  37. 0: 200
  38. 1: 201
  39. 2: 202
  40. 3: 203
  41. 4294967294: 100
  42. 4294967295: 101
  43. 4294967296: 102
  44. 4294967298: 104
  45. 4294967299: 109
  46. Test: unshift should throw when length is not writable.
  47. e instanceOf TypeError = true
  48. a.length = 1