Toggle Scripts On & Off

Lets say i press Q and it does

GetComponent(Script).enabled = false;

Ofcourse that works great one way but how can i set it so when i press Q again it will do

GetComponent(Script).enabled = true;

Like a switch between them. Javascript btw...

Thanks :) Also im only learning its most likely a very simple solution but no idea how :(

http://unity3d.com/support/documentation/ScriptReference/Input.html

Read up on that.

But:

function Update () {
  if (Input.GetButtonDown ("q")) {
    if(GetCompnent(Script).enabled=true)
    {
      GetCompnent(Script).enabled = false;
    }
    else
    {
      GetCompnent(Script).enabled = true;
    }
  }
}