New course! Every coder should learn Generative AI!
Try a free lesson+ 1
Why I got NaN as answer
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);