title: Get the input value of the last input field using JQuery
body: <p>Is there a way to get the last value of input text fields inside the <code>menus</code> class?</p>
  
  <p>The values are dynamic and the number of input fields are also dynamic.In this example we have 4 input fields inside the <code>menus</code> class and the last value I want to get is 4.</p>
  
  <pre><code>&lt;p class="menus"&gt;
      &lt;input type="text" name="test" class="test" value="1"&gt;
      &lt;input type="text" name="test" class="test" value="2"&gt;
      &lt;input type="text" name="test" class="test" value="3"&gt;
      &lt;input type="text" name="test" class="test" value="4"&gt;
  &lt;/p&gt;
  </code></pre>