Let's say I have this Object of arrays:
foo = {morning: [1,2,3,4,5], afternoon: [1,2,3,4,7]}
I want to write a function that returns this object but remove a particular value.
ex: I want to remove the number 3
in afternoon.
The function would return {morning: [1,2,3,4,5], afternoon: [1,2,4,7]}
myFunction = (partsOfDay, number) => {
// do something
// returns the object of arrays but without the specified value
}
How can I do that ?