Filter is used to filter the array to a subset of it based on provided criteria.Enter subject: Subject: