Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// Example of Single object
const user = {
firstName: 'Akash',
lastName: 'Rajvanshi',
age: 22,
getDetails() {
console.log(`I am ${this.firstName} ${this.lastName}`)
user.getDetails() // I am Akash Rajvanshi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.