I don't know if my question is right as in the title.
generally, I have this code:

```js
function one(){
    var main= document.getElementById('main');
    var arr = ['a','b','c','d','e']; 
    var btn = document.createEement('button');
    var btnTxt= document.createTextNode('click');
    main.appendChild(btn);
    btn.appendChild(btnTxt);
    btn.setAttribute('onclick','two()');
    return arr;
}

function two() {
    //I need to get the arr variable here.
}
```