Javascript,
How do I get the variable from within a variable to be used through-out the script?
<script>
var variable = function(snap) {
var header= snap.head();
var name = snap.name();
};
alert(variable.name);
</script>
I want to be able to use variable.name outside the function. If possible.