var
promptName = prompt("Whats your
Name?");
var
promptAge = prompt("How old are
you?");
function
person(){
this.name = promptName;
this.age = promptAge;
this.birth = gelenYear;
}
function
gelenYear(){
return 2016 - this.age;
}
var
p1 = new
person();
document.write("Your name is "
+ p1.name + " and your birth
year is "
Hiç yorum yok:
Yorum Gönder