Home Reference Source

methods/clear/index.js

/**
 *  Removes all elements from the array.
 *
 *  @param {Array} array
 *
 *  @return {Array} An empty array.
 *
 *  @example
 *  clear([1, 2, 3]); // => []
 *
 *  @example
 *  rbjs([1, 2, 3]).clear(); // => []
 */

// eslint-disable-next-line no-unused-vars
export default function clear(array) {
    return [];
}