title: asynchronous chrome method inside for loop
body: <p>for every variable i, below code should traverse thro' each bookmark node and compares the url, whether it exist or not.</p>
  
  <pre><code>for(i=0;i&lt;arg1;i++){
      chrome.bookmarks.getChildren(Traverse[i], function(child){       //to fetch the child nodes
          Loc =child.length;
          alert(Loc);   // This message to appear first
          if(Loc != 0){
              child.forEach(function(book) {
                  if (book.url == urL){
                      alert("Bookmark already exist");
                      element = "init";
                  }   
              }); 
          }
      });
  alert("message to be printed last");
  }
  </code></pre>
  
  <p>since the method is asynchronous, i'm getting the last message and bookmark traversing doesn't happens.
  Any help would be much appreciated.</p>
  
  <p>Thanks !! </p>