A question on distance

I want to write a script saying,

eg.
if player is one meter or less from the door, player can open it.

But, how do you do this? I know unity measures by default in meters but would write this in a script? Is it just literally:

(I know this is not javascript. It is an example…)

if(object "1 METER >);
player can open door… Please help.

You can also do a Google search anytime that you’re stuck on a problem. Really; whatever you’re doing, one hundred people have probably done it, gotten stuck and asked a question about it.

Which makes things really easy when you want to avoid common mistakes the first time.