crop_rotate
Run
<!DOCTYPE html> <html> <body> <h2>JavaScript Objects</h2> <p id="demo"></p> <script> function Person(first, last, age, eye) { this.firstName = first; this.lastName = last; this.age = age; this.eyeColor = eye; } Person.prototype.name = function() { return this.firstName + " " + this.lastName }; const myFather = new Person("alaa", "adel", 50, "blue"); document.getElementById("demo").innerHTML = "My father is " + myFather.name(); </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxib2R5Pg0KDQo8aDI+SmF2YVNjcmlwdCBPYmplY3RzPC9oMj4NCg0KPHAgaWQ9ImRlbW8iPjwvcD4NCg0KPHNjcmlwdD4NCmZ1bmN0aW9uIFBlcnNvbihmaXJzdCwgbGFzdCwgYWdlLCBleWUpIHsNCiAgdGhpcy5maXJzdE5hbWUgPSBmaXJzdDsNCiAgdGhpcy5sYXN0TmFtZSA9IGxhc3Q7DQogIHRoaXMuYWdlID0gYWdlOw0KICB0aGlzLmV5ZUNvbG9yID0gZXllOw0KfQ0KDQpQZXJzb24ucHJvdG90eXBlLm5hbWUgPSBmdW5jdGlvbigpIHsNCiAgcmV0dXJuIHRoaXMuZmlyc3ROYW1lICsgIiAiICsgdGhpcy5sYXN0TmFtZQ0KfTsNCg0KY29uc3QgbXlGYXRoZXIgPSBuZXcgUGVyc29uKCJhbGFhIiwgImFkZWwiLCA1MCwgImJsdWUiKTsNCmRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJkZW1vIikuaW5uZXJIVE1MID0NCiJNeSBmYXRoZXIgaXMgIiArIG15RmF0aGVyLm5hbWUoKTsgDQo8L3NjcmlwdD4NCg0KPC9ib2R5Pg0KPC9odG1sPg==