Calculations

X Value:
Y Value:

This section uses the parseFloat function to change the string to a number. Output is written using innerHTML because the values are being sent between p element tags.


The text was not reseting, so I made a function that reset it, but had to change the original name of the function from reset().


X2 Value:
Y2 Value:

Sum (x + y)
Product (x * y)
Comparison (x > or < y)

This section uses parseInt() method to convert the string to a number. The outputs are written to input fields. User is alerted if they enter the same number.


X3 Value:
Y3 Value:

Sum:

This section uses the number function, and is probably the best option.