Hi I am trying to calculate the percentage using the input from the HTML input
let timeSpend = document.querySelector(".time_spend")
var fSubject = (50/timeSpend)*100;
var sSubject = (25/timeSpend)*100;
var tSubject = (25/timeSpend)*100;
window.alert(fSubject);
This is my HTML input that I have the type of number but I don’t know why it still not working
<input
type="number"
id="text-box"
class="time_spend"
placeholder="How much time do you have?"
/>