I have wrote this function:
var person = new Object();
person.lengte = prompt("Wat is uw lengte")
person.gewicht = prompt("Wat is uw gewicht")
person.bmi = person.gewicht / (person.length * person.length);
alert("Uw BMI is:" + " " + person.bmi);
When i execute the code, everything works, but when the browser alert the alert, it is showing: "Uw BMI is: "NaN".
I tried this: alert("Uw BMI is:" + " " + person.length); and then it works and will gives the number what has been getting from the prompt.
Any idea how to fix this? It should work without having the person.bmi = person.gewicht / (..........) having in the last line of the code, the alert line.
Hopefully someone could help me with this!