In Javascript, is there any way to access a variable that is defined within a function from outside of it? [duplicate]

If I have a function:

function myFunction() {
  var x = "variable defined inside of myFunction";   
}

Is there any trick I can use to access x from outside of it?

I read about variables being scoped but was just wondering if there was any way around it.