I am making a simple javascript where I ask for three number inputs from the user. The script then returns sum, product, average, largest, and smallest.

The largest and smallest numbers are coming out, but not the arithmetic.

Hoping someone can tell me what is wrong.

Code:<script type = "text/javascript"> <!-- var input_one; var input_two; var input_three; var firstNumber; var secondNumber; var thirdNumber; var largest; var smallest; input_one = window.prompt( "Please Type a Number" ); input_one = window.prompt( "And Another One" ); input_three = window.prompt( "Just One More" ); firstNumber = parseInt (input_one ); secondNumber = parseInt ( input_two ); thirdNumber = parseInt ( input_three ); largest = firstNumber; smallest = firstNumber; if (secondNumber > largest) largest = secondNumber; if (thirdNumber > largest) largest = thirdNumber; if (secondNumber < smallest) smallest = secondNumber; if (thirdNumber < smallest) smallest = thirdNumber; window.alert( "Sum: " + ( firstNumber + secondNumber + thirdNumber ) + "\n" + "Average: " + ( ( firstNumber + secondNumber + thirdNumber ) / 3 ) + "\n" + "Product: " + ( firstNumber * secondNumber * thirdNumber) + "\n" + "Largest: " + largest + "\n" + "Smallest: " + smallest ); //--> </script> </head>