title: Nightwatch How to use local variable from one function to another
body: <p>I want to use local variable pass to another function or compare with any variable. Example:</p>
  
  <pre><code>browser
      .waitForElementVisible("//div[@class='col-xs-7 alignR uppercase']//strong", 5000, function () {
        browser
        .pause(500)
        .getText("//div[@class='col-xs-7 alignR uppercase']//strong", function(result){
          console.log('++++++++++++++',result.value);
          let numb1 = result.value;
          numb = numb1.match(/\d/g);
            numb = numb1.join("");
            console.log("value=", numb1);
            return numb1;
    })
      })
  
  .element('xpath', "(//div[@class='row']//div[@class='col-xs-7 alignR'])[1]", function (present) {
    console.log(present);
    if (present.status == 0) {
      //arrange 
      browser
      .pause(500)
      .getText("(//div[@class='row']//div[@class='col-xs-7 alignR'])[1]", function (result) {
        console.log("string", result.value);
        let numb = result.value;
        numb = numb.match(/\d/g);
        numb = numb.join("");
        console.log("value=", numb);
        return numb;
        })
  
  
    }
  
  })
  </code></pre>
  
  <p>I want to compare numb/numb1 or get the total both of them.</p>