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

Popular posts from this blog

Callback Hell

TODO list with DOM

Refactoring callback hell code