How do you get the user data from a HTML input (text) created using createElement()?
05:38 23 Aug 2022

My Problem

I would like some help understanding how to access the value inside input1 and input2, store them in a variable so I can later use them with a function that will calculate the two values and display it in the result div.

const input1 = document.createElement("input");
document.body.appendChild(input1);

const input2 = document.createElement("input");
document.body.appendChild(input2);

const result = document.createElement("div");
document.body.appendChild(result);
javascript