یه خبر جدید از ES6 در JS :
مثل اینکه ديگر میتوانید مقداری را از OBJ و آرایه به صورت مستقیم بردارید و به یک متغیر تحویل دهید اون مقدار و کلید دیگر حذف خواهد شد .
Array destructuring
Destructuring assignment is a cool feature that came along with ES6. Destructuring is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables. That is, we can extract data from arrays and objects and assign them to variables
#ES6 #javascript
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment
https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
@de_coder
مثل اینکه ديگر میتوانید مقداری را از OBJ و آرایه به صورت مستقیم بردارید و به یک متغیر تحویل دهید اون مقدار و کلید دیگر حذف خواهد شد .
Array destructuring
Destructuring assignment is a cool feature that came along with ES6. Destructuring is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables. That is, we can extract data from arrays and objects and assign them to variables
#ES6 #javascript
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment
https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
@de_coder
MDN Web Docs
Destructuring - JavaScript | MDN
The destructuring syntax is a JavaScript syntax that makes it possible to unpack values from arrays, or properties from objects, into distinct variables. It can be used in locations that receive data (such as the left-hand side of an assignment or anywhere…