Edit in JSFiddle

function myFunction() {
   var myVariable = 10;
}
console.log(myVariable);