const myArray = [2,4,5,6,9]

my.Array.filter(el => el < 5)

//keeps anything in new array that returns true
// [2,4]

//but it does not mutate the array, so
myArray
// remains  [2,4,5,6,9]