Question: Using only the script tag, sum the two span values together, and put the sum in the p tag with the id result. To convert
Using only the script tag, sum the two span values together, and put the sum in the p tag with the id result.
To convert a String value to an int, you can use the function parseInt which returns the integer value of a String. You will need to use this to convert the content of each span to an int. The result should contain the sum of the two numbers
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
