im working my way through the odin project and looking at for loops and different methods. Im trying to find a way to pass this test :
test('removes multiple of the same value', () => {
expect(removeFromArray([1, 2, 2, 3], 2)).toEqual([1, 3]);
});
I know you can remove a duplicate using filter and Sets but how do i remove both the 2's in the array so i end up with [1, 3]
I know this is probably simple but its just where im upto at the moment.