How do I filter an array using getDate() in Javascript?
I'm expecting to filter an array with a date attribute, and even though I'm getting the same equal values the new array isn't created. let array = [...] state.newArray = array.filter((f) => { let newDepartDate = new Date(f.depart_date); console.log( newDepartDate.getDate());…