DASHA
This commit is contained in:
		
							
								
								
									
										14
									
								
								Модули/user.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								Модули/user.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| function User(name, age) { | ||||
|     this.name = name; | ||||
|     this.age = age; | ||||
|     this.displayInfo = function () { | ||||
|         console.log( | ||||
|             `Имя: ${this.name}  Возраст: ${this.age}` | ||||
|         ); | ||||
|     }; | ||||
| } | ||||
| User.prototype.sayHi = function () { | ||||
|     console.log(`Привет, меня зовут ${this.name}`); | ||||
| }; | ||||
|  | ||||
| module.exports = User; | ||||
		Reference in New Issue
	
	Block a user
	 User1
					User1