Using a variable from another script in JS

Is it possible to use another variable from another script in another script?

The variable is a public variable. But i cant seem to get access to it through another script, do i need to import the script which holds the variable. Im new to java script so not sure how to go about this.

Thanks
EDIT: Nevermind, i forgot it needs to be a static variable.

Wrong, it does not need to be a static variable except in special circumstances where you only want a single value throughout the project.

Read these:
http://unity3d.com/support/documentation/ScriptReference/index.Accessing_Other_Game_Objects.html
http://unity3d.com/support/documentation/ScriptReference/index.Accessing_Other_Components.html

Ah I was not aware of that. Thanks :slight_smile:

Turns out a static was all i needed in this case, but thanks for mentioning the other alternatives.