1/49
Flashcards based on lecture notes about Arrays, Objects, and Functions in JavaScript.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Array
A data structure that allows the programmer to collect a number of related elements together in a single variable.
Array literal notation
One way to define an array in JavaScript using square brackets.
Array() constructor
One way to define an array in JavaScript using the Array() constructor.
Indexes
Used to access array elements.
push()
A method to add an item to the end of an existing array.
unshift()
A method to add an item at the beginning of an existing array.
pop()
A method to remove the last element from an array.
Spread syntax
Provides a new way to create an array from one or more existing arrays.
for…of
Iterating through an array using a simplified syntax.
Array destructuring
Provides a simplified syntax for extracting multiple scalar values from an array.
shift()
A method to remove the first element from an array.
splice()
A method used to add or remove elements from an array at any position.
forEach()
A method to iterate through the array.
map()
A method to create a new array by transforming elements of an existing array.
filter()
A method to create a new array with elements that satisfy a provided condition.
find()
A method to find the first element in an array that satisfies a provided condition.
includes()
A method to check if an array contains a specific element.
concat()
A method to combine two or more arrays.
sort()
A method to sort the elements of an array in place.
reverse()
A method to reverse the order of elements in an array in place.
Object literal notation
A way to create objects using a list of key-value pairs.
Dot notation
Accessing object properties using a dot.
Bracket notation
Accessing object properties using square brackets.
Object constructor
Creating an instance of an object using the Object constructor.
for…in loop
Used for iterating through object properties.
Destructuring
Used to extract properties from an object into distinct variables.
JSON
A language-independent data interchange format, a variant of object literal notation.
JSON.parse()
Used to turn a JSON string into an object.
Functions
Building blocks for modular code
Function declaration
A way to define a named function that can be called later in the code.
Function expression
A function assigned to a variable or property.
Arrow function
A compact alternative to a traditional function expression.
Default parameters
Parameters that have a default value if no argument is provided.
Higher-order function
A function that takes another function as an argument or returns a function.
1906
The year Cavite State University was founded.
Data structure
A collection of elements.
Array push
Adding an element to the end of the array.
Array unshift
Adding an element to the beginning of the array.
Array pop
Removing the last element of the array.
Array shift
Removing the first element of the array.
Array splice
Replacing array elements.
forEach array
Looping through each element in the array.
Array map
Creating a new array from another one.
Array filter
An array with only particular elements from the original.
Object
A data structure that holds key value pairs.
Dot notation
Access a value from an object using a dot
Add array data
Add data into an array
Call function
Calling a function
Object properties
Adding to an objects properties
Object properties
Changing an objects properties