I am calling a function on button click like this:
function outer() { alert(\"hi\"
If you want to call the "inner" function with the "outer" function, you can do this:
function outer() { function inner() { alert("hi"); } return { inner }; }
And on "onclick" event you call the function like this: