es6 block binding javascript code example
Example: block bindings es6
function getValue(condition) {
var value;
if (condition) {
value = "blue";
// other code
return value;
} else {
return null;
}
}