Argument vs arguments Object – Learn the Difference
An argument is the value of the built-in arguments object.
An argument is the value of the built-in arguments object.
Array destructuring is a unique technique that allows you to neatly extract an array's value into new variables.
An array object is an element used to bundle multiple unnamed values into a single item. A pair of square brackets defines JavaScript's array object.
An array-like object does not have built-in methods like map(), pop(), and forEach(). However, a regular array has those methods.
An array bundles values that a user cannot name, while an object bundles values that a user can name.
concat() populates a new array with the concatenation of its calling array and its arguments.
every() returns true if all its calling array's items pass its function argument's test. Otherwise, it returns false.
filter() creates a new array that contains all the calling array's elements that passed the test specified by the method's argument.
find() finds the calling array's element that first passes the test specified by the method's function argument.
findIndex() finds the index of the calling array's element that first passes the test specified by the method's function argument.
Fisher-Yates shuffle is an algorithm for generating random arrangements of an array.
The forEach() method invokes its argument once for each item of an existing array.
includes() checks if its calling array includes the method's first argument.
indexOf() searches its calling array for the first occurrence of the method's string argument.
join() creates a new string by using a comma, or a user-defined separator, to join the elements of an array object.
JSON (JavaScript Object Notation) is a text format for interchanging data between clients (web pages) and servers.
lastIndexOf() searches its calling array for the last occurrence of the method's argument.
map() creates a new array that contains the result of invoking map()'s function argument on each item of the calling array.
JavaScript's match() method creates a new array containing all the patterns that match the method's regular expression argument.
matchAll() creates a new iterator object containing all the patterns—including capturing groups—that match the method's regular expression argument.
A non-primitive data is a JavaScript value that can contain multiple other values. Object is the only non-primitive data that exist in JavaScript.
An object is an element you can use to bundle up multiple named values into a single item. A pair of braces define JavaScript's properties object.
JavaScript's pop() method removes and returns its calling array's last item. It does not accept any argument.
A JavaScript primitive data type is any plain value used to program a webpage. Examples are Number, Boolean, String, Null, and BigInt.
An impure function is a function that contains one or more side effects. A pure function is a function without any side effects.
JavaScript's push() method adds its arguments to the end of its calling array and returns the calling array's new length.
Whenever you use reduce() on an array, the method uses its function argument to reduce its calling array's items to a single value.
The rest operator is a syntax used to encase the rest of specific user-supplied values into a JavaScript array. It works with functions.
reverse() reverses an array so that its first item becomes the last and its last element becomes the first.
JavaScript's shift() method removes and returns its calling array's first item. It does not accept any argument.
JavaScript's slice() method duplicates a specified part of its calling array into a new array—without altering the original array.
some() returns true if some of its calling array's items pass its function argument's test. Otherwise, it returns false.
sort() sorts its calling array's items in ascending (or descending) order and returns the sorted array.
JavaScript's splice() method alters its calling array by adding or removing a specific number of items to/from it.
The spread operator helps to expand iterables into individual elements. It is effective only when used within an array, function, or object.
JavaScript's unshift() method adds its arguments to the beginning of its calling array and returns the calling array's new length.