0

I want to do sum two number + number2. Thanks you.

Sum two number + number2. https://code.sololearn.com/WO7uufAX2cXz/?ref=app

1st Apr 2021, 3:57 AM
Malick Diagne
Malick Diagne - avatar
1 Respuesta
0
You haven't appended <paragraph> and <paragraph2> to the body when you try to read their content. You only append <paragraph3> to the body. You need to read `innerHTML` rather than `value` property inside `add()` function. You need to convert the content of <id1> and <id2> paragraph into a number before you add them up. Otherwise you'll likely get a concatenated result of those two. You need to return sum result from `add()` function rather than setting <id3> content inside the `add()` function itself.
1st Apr 2021, 4:56 AM
Ipang