Skip to content

Instantly share code, notes, and snippets.

@mcsee
Last active August 24, 2025 02:08
Show Gist options
  • Save mcsee/d6eb4096c5009e6b0c788a488f32663c to your computer and use it in GitHub Desktop.
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
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