How do you make this work? find min or max b/w 2 entered values


Hi there,
So this is my code

            <div style = "margin-left:20px;" >
				<select style = "width:100px;color:#0000ff;">
					<option>Find Min</option>
					<option>Find Max</option>
				<input type = "text" name = "int1" placeholder = "Enter the first Number"> █
				<input type = "text" name = "in2" placeholder = "Enter second Number">
				<input type = "button" name = "Run" value = "Run it!" onclick = "eval()">


function eval(){

I want to make a function that decides on the chosen option, what to find.. and then when finding out what they chose. it should find that which will either be Minimum or maximum of the two entered values!



How do you expect help with this? You haven't written any JS code yet. What is the struggle?


struggle is I'm new to javascript, So I don't know how to even start this exercise... all I was told is to give options between min or max, and then decide which of the two values added are to be displayed based on the option chosen.


Maybe learn some more JS? as for what you need, here are two helpful MDN doc page:

and a useful stackoverflow question: