Light up light with a button and delete any other

Hello, I would light up by pressing the 3 key and delete when any key is pressed .
I am using this script, but it does not work as I want . Please help me …

var flashlight : GameObject;


var myLight : Light = flashlight.GetComponent("Light");
function Update()
{

if (Input.GetKey("3"))
{
   myLight.enabled = !myLight.enabled;
}

}

That script must be attached to the light.

if( Input.GetKeyDown("3")  )
   myLight.enabled = true;
if( Input.GetKeyUp("3")  )
   myLight.enabled = true;