function sayHello() {
    var ohai = 'Hello world !';
}

sayHello();

alert(ohai);