Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export class Animal {
- constructor(name, species) {
- this.name = name;
- this.species = species;
- }
- greet() {
- return `Hello, my name is ${this.name}!`;
- }
- }
- export function greet(name){
- return `Hello, my name is ${name}!`;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement