Use Destructuring Assignment to Assign Variables from Arrays, Learning JS ES6 2020, Web Dev VIDEO
In this lesson we continue learning about destructuring syntax in ES6. We target array destructuring in this lesson and find out it is very similar to destructuring an object. We learn that we are able to target items in an array by using destructuring syntax. The difference is, that in the past we used curly braces, but if we want to assign our variables values from an array, we must use commas to assign our variables the proper value. If we wanted to grab a value from the 5th item in an array, but not the first 5, we would use 4 commas to denote we want to only grab the 5th value. Learning to use destructuring assignment to assign our variables values from arrays can make our code easier to read and manage and is a vital es6 skill to have.
Other Videos By We Will Code 2019-12-21 Reuse Javascript Code Using import, freeCodeCamp's ES6 Challenges, Javascript Help 2020 2019-12-20 Use export to Share a Code Block, ES6 Challenges freeCodeCamp, WebDev Tutorials 2019-12-18 Create a Module Script, Learn JS ES6 Syntax on freeCodeCamp, Learn to Code Free Online Tutorial 2019-12-17 Use getters and setters to Control Access to an Object, freeCodeCamp's Learn ES6 Syntax Challenges 2019-12-03 Use class Syntax to Define a Constructor Function, ES6 tutorial, Learn ES6 Syntax 2019-12-02 Write Concise Declarative Functions with ES6, Learn ES6 Syntax 2019-11-29 Write Concise Object Literal Declarations Using Object 2019-11-28 Create Strings using Template Literals, Learn JS ES6 2019-11-26 Use Destructuring Assignment to Pass an Object as a Function's Parameters,Learning Destructuring ES6 2019-11-24 Use Destructuring Assignment with the Rest Parameter to Reassign Array Elements, Learn JS 2020 2019-11-23 Use Destructuring Assignment to Assign Variables from Arrays, Learning JS ES6 2020, Web Dev 2019-11-22 Use Destructuring Assignment to Assign Variables from Nested Objects, Learning the ES6 Syntax 2019-11-21 Use Destructuring Assignment to Assign Variables from Objects, An ES6 Course Introduction 2019-11-20 Use Destructuring Assignment to Extract Values from Objects, freeCodeCamp tutorials for ES6 2019-11-19 Use the Spread Operator to Evaluate Arrays In-Place, An ES6 Teaching 2019-11-18 Use the Rest Parameter with Function Parameters, freeCodeCamp Course on ES6 Syntax, Learn JS 2020 2019-11-17 Set Default Parameters for Your Functions, ES6 Courses on 2019-11-16 Write Arrow Functions with Parameters, freeCodeCamp's ES6 Course, ES6 Challenges FreeCodeCamp 2019-11-15 Use Arrow Functions to Write Concise Anonymous Functions, freeCodeCamp's ES6 Challenges, Javascript 2019-11-14 Prevent Object Mutation, ES6 freeCodeCamp Introduction, Learn Javascript in 2020, ES6 Syntax 2019-11-13 Mutate an Array Declared with const, 2020 ES6 Tutorials, freeCodeCamp ES6 Challenges 2020
Tags: destructuring nested objects
es6 destructuring syntax
learning destructuring arrays
es6 arrays
arrays in es6
learning js 2020
2020 js course
freeCodeCamp walkthrough