diff --git a/02basics/myObjects.ts b/02basics/myObjects.ts index dafba8c..ac11946 100644 --- a/02basics/myObjects.ts +++ b/02basics/myObjects.ts @@ -4,7 +4,8 @@ // isAvtive: true // } -// function createUser({name: string, isPaid: boolean}){} +// destruct the object passed as parameter and assign datatype to it +// function createUser({name, isPaid} : {name: string, isPaid: boolean}){} // let newUser = {name: "hitesh", isPaid: false, email: "h@h.com"} @@ -69,4 +70,4 @@ myUser.email = "h@gmail.com" -export {} \ No newline at end of file +export {}