title: js object is undefined inside my function
body: <p>I have a the following JS function:</p>
  
  <pre><code>export function createQueryString(obj){
      const Qstring = require('querystring'); 
      const newQuery = Qstring.stringify(obj);
  }
  
  export function fetchLocation() {
      let data= {
          name: "Alex",
          family:   "Jones",
          b-date: "19/01/1980",
          email: "example@example.com"
      };
  
      const queryString = createQueryString(data);
      console.log(queryString );
  }
  </code></pre>
  
  <p><code>queryString</code> returns undefined!</p>
  
  <p>and I am not sure why not, how can I make sure that <code>queryString</code> return correct value!</p>