javascript return array with item remove with a new array code example Example: remove a specific element from an array array.splice(array.indexOf(item), 1);