Created
April 13, 2024 02:05
-
-
Save madhoshyagnik/efb4e9e7e924602be99c4072a2d544da to your computer and use it in GitHub Desktop.
This file contains 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
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(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
javascript - methods inside objects