Edit in JSFiddle
JavaScript
HTML
CSS
Result
function demo(){ var a = b = 0; } demo(); alert(b); alert(a); //a is not defined