<script>
var x;
x="Hello";
function demo()
{
document.write(x);
}
demo();
</script>
Hello