Strict comparison === means that both type and value must be the same to return true as result. The reason, both those currentUser._id and shinyItem.author.id look the same, is that they might be used in a context, where javascript engine tries to implement type coercion. If currentUser._id is mongoose ObjectID, it has toString method in it, and javascript engine will use it while implementing type coercion and returns a string:
// log id is 5e59d4dfe93451416fc551db, instead of
// log id is ObjectID {_bsontype: "ObjectID", id: Buffer(12)}
console.log(`id is ${currentUser._id}`);
So using strict comparison between ObjectID and string resolves to false:
// value is the value is the
// same, but type same, but type
// is ObjectID is string
currentUser._id === shinyItem.author.id // false
But loose equality comparison == resolves to true, because, behind the scene, javascript engine tries to coerce both values to the same type (string), using toString method of ObjectID and converting it to the string:
currentUser._id == shinyItem.author.id // true
Mongoose also has id virtual getter, which returns the documents _id field cast to a string, so you can use it like this (if you did not disable it in schema):
// id is a string
currentUser.id === shinyItem.author.id // true
()when you mix&&and||. The order of execution can be confusing when you look at this code.