title: How can we return string from callback function to root function in node.js?
body: <pre><code>function add(post)
  {
      var word = new KeyWord({ keyword: post.keyword});    
      word.save(function (err, word) 
      {
          if(err)
          {
              if(err.code==11000)
                  return post.keyword + ' is already added.';
          }
          else
              return 'Added : ' + post.keyword;
      });
  }
  </code></pre>
  
  <p>When I am trying to read return value of add function it returns nothing.<br>
  And also when I am trying to put message in variable and return that from outside also give null value.</p>