if same element found remove javascript array code example Example: javascript remove from array by index //Remove specific value by index array.splice(index, 1);