Last active
August 24, 2025 02:08
-
-
Save mcsee/d6eb4096c5009e6b0c788a488f32663c to your computer and use it in GitHub Desktop.
This gist belongs to Clean Code Cookbook http://cleancodecookbook.com By Maximiliano Contieri http://maximilianocontieri.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User{ | |
private name; | |
public email; | |
constructor(name,email) { | |
this.name=name; | |
this.email = email; | |
} | |
private validateEmail() { | |
return this.email.includes('@'); | |
} | |
public getName(){ | |
return this.name; | |
} | |
public setName(newName) | |
{ | |
this.name=newName; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment