array map destructuring
var arr = [
{ name: "Anuja", from: "Saurav" },
{ name: "Saurav", from: "Anuja" },
{ name: "All", from: "All" },
];
arr.map(({ name, from }) => console.log(name, from));
array map destructuring
var arr = [
{ name: "Anuja", from: "Saurav" },
{ name: "Saurav", from: "Anuja" },
{ name: "All", from: "All" },
];
arr.map(({ name, from }) => console.log(name, from));
Object destructuring
Object Destructuring =>
//
The destructuring assignment syntax is a JavaScript expression that makes it
possible to unpack values from arrays,
or properties from objects, into distinct variables.
//
example:
const user = {
id: 42,
is_verified: true
};
const {id, is_verified} = user;
console.log(id); // 42
console.log(is_verified); // true
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us