If I understand your question correctly, your setup looks like this:
const A = [ {hello: "world"}, {hi: "everyone"} ];
const B = {hello: "world"};
console.log(A.includes(B)); // returns false
A.includes(B)
returns false because Javascript evaluates object equality based on objects' references (where they are stored in memory), not their values. As a result, even though B looks like it is included in A, the two objects have different references because they are declared independently of each other. You can read more about object equality in Javascript here: http://adripofjavascript.com/blog/drips/object-equality-in-javascript.html
Using this information, you can change your setup so you get the expected answer:
const A = [ {hello: "world"}, {hi: "everyone"} ];
const B = A[0];
console.log(A.includes(B)); // returns true