Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Accessing Properties in JavaScript Objects using Destructuring

const myObject = {title: 'My Title', name: 'My Name'};
const {title, name} = myObject;

console.log(name); // "My Name"
console.log(title); // "My Title"
Source by blog.debugeverything.com #
 
PREVIOUS NEXT
Tagged: #Accessing #Properties #JavaScript #Objects #Destructuring
ADD COMMENT
Topic
Name
3+1 =