Why I got NaN as answer | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
23rd Jan 2023, 9:20 AM
Unknown
Unknown - avatar
1 Answer
+ 2
you are trying to add two elements not thier values. add .value to correct the code. let n1 = parseFloat(n_1.value); let n2 = parseFloat(n_2.value);
23rd Jan 2023, 9:29 AM
Bahhaⵣ
Bahhaⵣ - avatar