title: return value from a callback function in javascript?
body: <p>I'm using node.js and the library <a href="https://github.com/Marak/translate.js" rel="noreferrer"> Translate </a>. Can i do something like this ? :</p>
  
  <pre>
  <code>
  function traduce(text){
      translate.text(text,function(err,result){
          return result;
      });
  }
  </code>
  </pre>
  
  <p>And then use the result? It always return me "undefined". is there any way to use the result without do this? : .</p>
  
  <pre>
  <code>
  translate.text(text,function(err,result){
       // use result
       // some logic
  });
  </code>
  </pre>