+ 1
please how can you make the user to specify the values of an object for example you have already create the age property but you
getting user inputs for objects
1 ответ
0
thanks but this isn't really what I'm looking for.
function person (name, age) {
this.name = name;
this.age = age;
}
var John = new person("John", 25);
var James = new person("James", 21);
document.write(John.age);
take the above code for example
I want it to be that it will be the user who will input their age after the browser might have prompt them to,
how can I do that