"Double" conditional check? alarm.alarmOn = position != resetPosition;

alarm.alarmOn = position != resetPosition;

This is a line of code from Unity’s project, stealth.
What does this line mean?

The comment to this line says: // Set the alarm light to be on or off.

does it equal to : alarm.alarmOn = (position != resetPosition); ?

Yes, it does equal to the same thing in parentheses. You are not required to use those in a statement like this.