Variable from other gameObject

My problem:
I know there is possible to get public variable from another script.
I hear something about GetComponent but I’m confused.

What do I do:
zombieViewZone.js

    #pragma strict

	public var variable = "Hahaha";


function Start () {

}

function Update () {

}

zombieMovement.js

#pragma strict

	var damageZone : GameObject;
	var viewZone : GameObject;

function Start () {
	var vz = viewZone.GetComponent("variable");

}

function Update () {
	vz = viewZone.GetComponent("variable");
	
	Debug.Log(vz);
}

I know this is bad. But I need to know how to write it corectly. I googled many times, checked this site but I’m confused in that. Maybe example out from this script.

Hi, I explain it pretty clearly in these two topics: