title: How to get value from an array, only those what is greater than all elements to its right
body: <p>I wanted to write a function to get all numbers, what is greater than all elements to its right.</p>
  
  <p><strong>Example</strong> if i have an array like this:</p>
  
  <pre><code>arr = [ 75,47,42,56,13,55];
  </code></pre>
  
  <p><em>I want a result like this</em> <code>[75,56,55]</code>in a new array.</p>
  
  <p><strong>Other example</strong> if i have an array like this:</p>
  
  <pre><code>arr = [16,17,14,3,14,5,2]
  </code></pre>
  
  <p><em>I want a result like:</em> <code>[17,14,5,2]</code></p>
  
  <p>What methods can i use to get this result whatever numbers i have in an array?</p>