mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-04-22 09:09:09 +00:00
19 lines
240 B
JavaScript
19 lines
240 B
JavaScript
class Test {
|
|
constructor() {
|
|
this.rand = Math.random();
|
|
}
|
|
|
|
get data() {
|
|
return {
|
|
name: "Ted",
|
|
rand: this.rand
|
|
};
|
|
}
|
|
|
|
render({ name }) {
|
|
return `<p>${name}${this.rand}</p>`;
|
|
}
|
|
}
|
|
|
|
module.exports = Test;
|