module.exports = {
post: (title, body, autor) => {
this.title = title
this.body = body
this.autor = autor
},
search: function(search, arr , call){
var result = arr.find(a => a.title == search)
call(null, result)
}
}
I have this code when I execute it tells me "can not read property find of undefined", before I tried it out of module.exports. I've searched it in google and here and I can not find the error. thank you, thanks