title: variable from callback is sometimes empty
body: <p>I have an function which returns an random color in an callback, like this:</p>
  
  <pre><code>function getRandomColor(callback) {
  
      var colors = [
          'greyblue',
          'lightblue',
          'blue',
          'lightgreen',
          'darkgreen',
          'purple',
          'pink',
          'red',
          'yellow',
          'brown'
      ];
  
      var random = Math.floor(Math.random() * colors.length+1);
      var color = colors[random];
  
      return callback(color);
  }
  </code></pre>
  
  <p>This function is called in an other function which needs the value from the callback. But <code>color</code> from the callback is sometimes empty. Can anybody explain why this is happening? I use an callback to prevent an empty value actually but it looks like it's not an waterproof solution.</p>
  
  <pre><code>function createCategory(name, access_token, callback){
      getRandomColor(function(color){
          countr.callApi(
              {
                  url: 'categories', 
                  method: 'POST'
              }, {
                  name: name, 
                  visible: true, 
                  color: color 
              }, 
              access_token, 
              function(err, category){
                  return callback(err, category);
              }
          )
      })
  }
  </code></pre>
  
  <p>Since the API where are using is requiring an color on an category (which we want to create) this call will fail because <code>color is undefined</code>. I want to know why, and how to solve. </p>