+ 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

12th Aug 2017, 8:23 PM
Oluwaseun Ogunlana B.
Oluwaseun Ogunlana B. - avatar
3 Respostas
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
14th Aug 2017, 7:34 PM
Oluwaseun Ogunlana B.
Oluwaseun Ogunlana B. - avatar