Created
January 12, 2022 19:56
-
-
Save rahulbanerjee26/73de7d6cdc5dc1c0b818d421008ad252 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
//Declaring object with type any | |
let user:any = { | |
id: 10, | |
name: 'Rahul', | |
email: 'a@g.com' | |
} | |
console.log(user.name) | |
//Rahul | |
console.log(user.email) | |
//a@g.com | |
console.log(user.number) | |
// undefined | |
user.age = 22 | |
console.log(user.age) | |
// 22 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment