Arrays: Left Rotation

  • + 1 comment

    I did:

    function rotLeft(a, d) {

    let removed = a.splice(0, d);
    return a.concat(removed);
    

    }