Destructuring Objects
const student={
name:"Abhii",
age:14,
class:10,
subjects:["eng","sci","math"],
username:"abhi@71",
password:5468,
city:"kmm"
};
let{username,password}=student;
let{username:user,password:secret,city="hyd"}=student;

Comments
Post a Comment