JSFiddle - React, Tailwind, and code Playground

HTML

<input class="myclass" name="foo1" id="foo1" type="text" value="57"> 
<input class="myclass" name="foo1" id="foo1" type="text" value="24"> 
<input class="myclass" name="foo1" id="foo1" type="text" value="11"> 
<input class="myclass" name="foo1" id="foo1" type="text" value="78">

JavaScript

$( function() {
    var max = 0;
    $( '.myclass' ).each( function() {
        if( parseInt( $( this ).val(), 10 ) > max ) {
            max = parseInt( $( this ).val(), 10 );
        }
    } );
    alert( max );
});