Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save madhoshyagnik/efb4e9e7e924602be99c4072a2d544da to your computer and use it in GitHub Desktop.
Save madhoshyagnik/efb4e9e7e924602be99c4072a2d544da to your computer and use it in GitHub Desktop.
let user = {
name: 'crystel',
age: 30,
email: 'crystel@gmail.com',
location: 'berlin',
blogs: ['why mac and cheese rules', ['10 things to make with marmite']],
login: function(){
console.log('user logged in');
},
logout: function(){
console.log('the user is logged out')
}
};
user.login();
@madhoshyagnik
Copy link
Author

javascript - methods inside objects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment