mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
10 lines
178 B
JavaScript
10 lines
178 B
JavaScript
function Person(name) {
|
|
this.name = name;
|
|
this.kill = function() { this.name += " is dead"; };
|
|
}
|
|
|
|
var a = new Person("Kenny");
|
|
a.kill();
|
|
result = a.name == "Kenny is dead";
|
|
|