13th Sep 2022, 3:45 PM
Mohd Junaid
2 Answers
+ 3
What is it supposed to do? Please describe the expected behavior. It looks like you are trying to add or subtract the numbers in the input fields. There are some issues: * You never get the values (.value) of the input fields * If the JS loads before body, your code won't be able to find the <input> elements * You may need to convert the values to numeric data type * Currently you don't output the result anywhere, so we cannot see the effect of the button presses
13th Sep 2022, 3:53 PM
Lisa
Lisa - avatar