Filtering data in react

const filteredSubscriptions=subscriptions.filter((item)=>{

return === filteredYear


this code showing error “get full year is not a function”

so i have to use this const theDate = new Date(
variable inside the const filteredsubcriptions

It is showing error in this block inside app.js component file

 const filterBookData=bookdetails.filter((items)=>{       return === filteredYear  })

Share your project code here to check