Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript object destructing

const employee = {name: ‘ANE01’, email: ‘Anna@example.com’, phone:’0112–345–6789'};
//with destucturing
const {name, email, phone} = employee;
//without destucturing
const name = employee.name;
const email = employee.email;
const phone = employee.phone;
Source by blog.bitsrc.io #
 
PREVIOUS NEXT
Tagged: #javascript #object #destructing
ADD COMMENT
Topic
Name
6+9 =