var var = 1; console.log(var);
Uncaught SyntaxError: Unexpected token var
var res = { a: 1 }; delete res.a; console.log(res);
{}
function hola(){ function mundo(){ console.log(res); } var res = 1; mundo(); } hola();
1
function hola(){ var mundo = function (){ return console.log('hi');}; console.log(mundo); } hola();
function (){ console.log('hi')}
function hola(){ var mundo = function (){ return 'hi';}; console.log(mundo()); } hola();
'hi'
By Alejandro Oviedo García
Alejandro is a developer who loves learning new things. He is passionate about education, electronics, Open Source, and community-driven events.