I presume your array is being declared within the html page, not that it really makes a difference. The only important thing to know is that the string needs to be declared before the array. Otherwise. you will get a null object error.
var myArray = new Array();
myArray = myStr;
myArray[myArray.length++] = myStr;
for (i = 0; i < myArray.length; i++)
alert( " cell " + i + " contains " +myArray[i]);
and in the str.js file:
var myStr = "This is my string";