Javascript Quiz Parte 2

Asumir que toda variable no esta declarada a menos que se especifique lo contrario

function hola(miVariable) {
    console.log(miVariable);
}

var miVariable = 1;
hola();

undefined

function hola(miVariable) {
    console.log(miVariable);
}

var miVariable = 1;
hola("mundo");

"mundo"

function hola(){
    var miVariable = 1;
    return;
}

hola();
console.log(miVariable);

Uncaught ReferenceError: miVariable is not defined

Made with Slides.com