* Copy contents of one array to another without allocating new array.
(a, b)
| 455 | * Copy contents of one array to another without allocating new array. |
| 456 | */ |
| 457 | function copyArray (a, b) { |
| 458 | var i; |
| 459 | a.length = b.length; |
| 460 | for (i = 0; i < b.length; i++) { |
| 461 | a[i] = b[i]; |
| 462 | } |
| 463 | } |