No Block Scope In JavaScript

Question | Sep 20, 2015 | nextptr 

Scope of a Javascript variable is its execution context, which is either the function in which the variable is declared or - for variables declared outside a function - global. There is no block level scope in Javascript - a variable declared inside a block is scoped at enclosing function (or script) level. Having said that, consider below code:

var x = 10; // This is global scope
function example(cond) {
        var x = 20;
    return x;


What is output of above?