1/19
Vocabulary flashcards covering destructuring, higher-order functions (map, filter, reduce), and ReactJS concepts from the lecture notes.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Destructuring
A convenient ES6 syntax that unpacks values from arrays or properties from objects into distinct variables (introduced in ES6/ECMAScript 2015).
Array Destructuring
Destructuring syntax that extracts array elements into variables using square brackets, e.g., const [a, b] = arr.
Object Destructuring
Destructuring syntax that extracts object properties into variables using curly braces, e.g., const { name, age } = person.
Traditional Method
The standard approach to access array elements or object properties before destructuring was introduced.
Higher-Order Functions
A function that accepts other functions as arguments or returns functions as results.
Map
Creates a new array by transforming each element with a provided function; does not change the original array.
Filter
Creates a new array containing elements that pass a test; does not change the original array.
Reduce
Reduces an array to a single value by accumulating results; returns the final accumulated value.
Arrow Function
A concise function syntax (e.g., const f = x => x * 2) used in examples.
Rest in Destructuring
Collects remaining elements into a rest array using the …rest syntax. (“…” is called ellipsis)
Skipping Items in Destructuring
Skip elements in array destructuring by leaving gaps (e.g., const [a,, c] = arr).
Default Values in Destructuring
If a value is undefined, you can assign a default value to the variable.
Destructuring in Function Parameters
Destructuring can be used directly in function parameter lists to extract data from arguments.
ReactJS
A free and open-source front-end JavaScript library for building UIs with components (created by Jordan Walke).
Components (React)
Reusable pieces of UI code that can be nested to build complex user interfaces.
Props
Properties; data passed from a parent component to a child component; read-only.
npx create-react-app
Command used to scaffold a new React application by downloading the required libraries. A command-line tool used to quickly set up a new React application with a standard configuration and build settings.
npm start
Command to run the React development server locally.
npx
NPM package runner used to execute commands from packages (e.g., npx create-react-app).
ES6 (ECMAScript 2015)
The version of JavaScript that introduced features like destructuring.