I'm really new to this, no errors are showing up, but code doesn't work. Trying to get the min and max value of numbers entered in the text-box.
here's the code:
<html lang="en">
<body>
<h1>Problem JavaScript</h1>
Enter a series of numbers with spaces in between each:
<input type="text" name="qty1" id="qty"/>
<button type="button" onclick="calculate();">Enter</button>
</body>
</html
function calculate(){
var numInput = getElementById("qty");
var numArray = numInput.split(" ");
document.write('Min value is:', Math.min.apply(null, numArray));
document.write('Max value is:', Math.max.apply(null, numArray));
}