var temp = 'aaa';
<script>
src="http://domain.com/file.js";
window.onload = function () {
console.log(temp .length);
}
</script>
src="http://domain.com/file.js";
<script src="http://domain.com/file.js"></script>
<script>
window.onload = function () {
console.log(temp.length);
}
</script>
// http://domain.com/file.js:
temp = [1, 2];