How to Convert a Variable Name to a String?

I have a bunch of static variables in another script that I’d like to access. I’d like to be able to tell if a string has the same name as the other variable. For example, if the other script was called script1 and the variable was called variable1:

var words : String;

function Start(){
if(words == script1.variable1){

How would I make it so the name of the variable could be converted into a string?

No no no!

Name of, is the correct way to get variables as a string.

This should help you out.

Finding the Variable Name passed to a Function in C#