Code coverage report for array/append.js

Statements: 100% (8 / 8)      Branches: 100% (0 / 0)      Functions: 100% (3 / 3)      Lines: 100% (7 / 7)     

All files » array/ » append.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 181           1 1     1 3   1   1    
define(function () {
 
    /**
     * Appends an array to the end of another.
     * The first array will be modified.
     */
    function append(arr1, arr2) {
        var pad = arr1.length,
            i = -1,
            n = arr2.length;
        while (++i < n) {
            arr1[pad + i] = arr2[i];
        }
        return arr1;
    }
    return append;
});