title: Call method inside function
body: <p>i have a wizard from a metronic theme where I'm trying to call a function to check if my array contains dublicates.</p>
  
  <p>if I remove this part of my code it works without problems.</p>
  
  <pre><code>console.log(this.checkIfArrayIsUnique()); 
  </code></pre>
  
  <p>code</p>
  
  <pre><code>var wizard = (&lt;any&gt;$('#m_wizard')).mWizard();        
                      //== Validation before going to next page
                      wizard.on('change', function(wizard) {
                          if(wizard.getStep() &gt; 2){    
                              console.log(this.checkIfArrayIsUnique());                     
                          }
                          mApp.scrollTop();                                        
                      })
  </code></pre>
  
  <p>Right now my checkIfArrayIsUnique() is just a dummy function</p>
  
  <pre><code>checkIfArrayIsUnique() 
      {
          return true;
      }
  </code></pre>
  
  <p>how can i call a method outside my 'change' event ? So I'm able to run thru my array and confirm it does not have any dublicates.</p>