title: wp.customize, get value from a setting and store in a variable
body: <p>I am currently working on the theme options for a custom theme for a client. For further use i want to store a few settings inside variables during the page load of the customizer screen.</p>
  
  <p>After a bit of a struggle i used wp.customize object to get the value of the setting i required and store it inside the variable. However the information of the variable can not be accessed outside of the function, even tho i declared the variable outside of the function. I have posted the function below.</p>
  
  <p>The console log inside the function posts the value that i need. The console log outside of the function returns undefined. I would like some help on getting this to work. </p>
  
  <p>Thank you in advance, Nick</p>
  
  <pre><code>var e_linkedin;
  var e_facebook;
  var e_twitter;
  var e_google;
  
  wp.customize( 'theme_social[enable_facebook]', function( value ) {
      e_facebook = value['_value'];
      console.log(e_facebook);
  
  });
  console.log(e_facebook);
  </code></pre>