How to check if object is "this" object?

I’m looping through some objects with Javascript:

for(block in blocks){
//script
}

I’ve notice that the object running the script is included in “blocks”, so I was wondering how to check if an object is the exact instance of the object running the script.

if (block.gameObject == gameObject)
// Or if this is running from a block component
if (block == this)