So I have an object of goals. And I wanna see if one specific goal is inside.
I'm doing this:
for (let i = 0; i < this.goalsHome.length; i++) {
console.log(this.goalsHome[i].includes(goal));
}
Which results in an error includes does not exists on type object.
But what If I want to check one specific object property ? Let's say I want to check if the goal's comment matches one of the goals comment in the object. That should be possible right ? By looping trough it?
But if I add .comment
in between it says comment doesn't exist on type object.