How do I acess a variable outside of my script in javascript?

I want to have a script inside one block but be able to access the variables in a different block. How do I do this?

Add a var to the script
The unity Documentation is a amazing thing