Narcissistic Pickle Meister

    @writetome51/array-remove-adjacent-at
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.0 • Public • Published

    removeAdjacentAt(
           startingIndex,
           howMany,
           array
    ): void

    Beginning at startingIndex, it removes howMany adjacent items from array.
    startingIndex can be negative or positive.

    Examples

    let arr = [10,20,30,40,50,60,70,80,90];  
    removeAdjacentAt(-4, 2, arr);  
    // arr is now  [10,20,30,40,50,80,90]
    
    let arr = [10,20,30,40,50,60,70,80,90];  
    removeAdjacentAt(2, 4, arr);  
    // arr is now  [10,20,70,80,90]
    

    Installation

    npm i @writetome51/array-remove-adjacent-at

    Loading

    import {removeAdjacentAt} from '@writetome51/array-remove-adjacent-at';

    Install

    npm i @writetome51/array-remove-adjacent-at

    DownloadsWeekly Downloads

    8

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    3.03 kB

    Total Files

    5

    Last publish

    Collaborators

    • writetome51