JS Built-ins
π
en
|
es
Apprentice
0 XP
β
Search
βK
Exam β
Stats β
Learning Path
β
β°
β Home
Array
0 / 226 completed (0%)
All Difficulties
Beginner
Intermediate
Advanced
All
Not Started
Attempted
Completed
Exercises (226)
β
Array.from() β convert a string to chars
Beginner
β
Array() β create an empty array
Beginner
β
Array() β create array with a given length
Beginner
β
Array() β create array from multiple arguments
Beginner
β
Array() β create an array of zeros
Intermediate
β
Array() β create a range [1β¦n]
Intermediate
β
Array[Symbol.species] β subclass map()
Advanced
β
Array[Symbol.species] β subclass filter()
Advanced
β
Array[Symbol.species] β override to return plain Array
Advanced
β
Array[Symbol.species] β subclass concat()
Advanced
β
Array[Symbol.species] β Array.isArray on subclass result
Advanced
β
Array.from() β create an index array
Beginner
β
Array.from() β deduplicate with a Set
Intermediate
β
Array.from() β generate even numbers with a map function
Intermediate
β
Array.from() β count Unicode code points
Intermediate
β
Array.from() β sum variadic arguments
Advanced
β
Array.fromAsync() β resolve an array of promises
Advanced
β
Array.fromAsync() β collect from a generator
Advanced
β
Array.fromAsync() β map each element
Advanced
β
Array.fromAsync() β works with sync iterables
Advanced
β
Array.fromAsync() β safe collection with fallback
Advanced
β
Array.isArray() β basic check
Beginner
β
Array.isArray() β why not typeof
Beginner
β
Array.isArray() β filter only arrays
Intermediate
β
Array.isArray() β check if all elements are arrays
Intermediate
β
Array.isArray() β distinguish array-like objects
Advanced
β
Array.of() β create an array from arguments
Beginner
β
Array.of() β avoid the single-number trap
Beginner
β
Array.of() β wrap a single value
Beginner
β
Array.of() β mixed-type array
Intermediate
β
Array.of() β verify deep equality
Intermediate
β
Array.prototype.at() β get first element
Beginner
β
Array.prototype.at() β get last element
Beginner
β
Array.prototype.at() β second-to-last element
Beginner
β
Array.prototype.at() β out-of-bounds returns undefined
Intermediate
β
Array.prototype.at() β get middle element
Intermediate
β
Array.prototype.concat() β join two arrays
Beginner
β
Array.prototype.concat() β join multiple arrays
Beginner
β
Array.prototype.concat() β append a value
Beginner
β
Array.prototype.concat() β immutability
Intermediate
β
Array.prototype.concat() β merge three arrays
Intermediate
β
Array.prototype.copyWithin() β copy to index
Intermediate
β
Array.prototype.copyWithin() β shift elements left
Intermediate
β
Array.prototype.copyWithin() β negative target index
Intermediate
β
Array.prototype.copyWithin() β copy a range
Advanced
β
Array.prototype.copyWithin() β returns the same array
Intermediate
β
Array.prototype.entries() β convert to array
Beginner
β
Array.prototype.entries() β index/value pairs
Intermediate
β
Array.prototype.entries() β find entry by value
Intermediate
β
Array.prototype.entries() β rebuild array from iterator
Intermediate
β
Array.prototype.entries() β combine arrays into an object
Advanced
β
Array.prototype.every() β check all positive
Beginner
β
Array.prototype.every() β check non-empty strings
Beginner
β
Array.prototype.every() β vacuous truth
Beginner
β
Array.prototype.every() β check object properties
Intermediate
β
Array.prototype.every() β check all even
Intermediate
β
Array.prototype.fill() β fill entire array
Beginner
β
Array.prototype.fill() β fill from index
Beginner
β
Array.prototype.fill() β fill a range
Intermediate
β
Array.prototype.fill() β create zero-filled array
Intermediate
β
Array.prototype.fill() β fill last elements with negative index
Intermediate
β
Array.prototype.filter() β keep even numbers
Beginner
β
Array.prototype.filter() β filter by string length
Beginner
β
Array.prototype.filter() β filter objects by property
Intermediate
β
Array.prototype.filter() β keep unique values
Intermediate
β
Array.prototype.filter() β remove falsy values
Intermediate
β
Array.prototype.find() β find first match
Beginner
β
Array.prototype.find() β find object by id
Intermediate
β
Array.prototype.find() β returns undefined when not found
Beginner
β
Array.prototype.find() β find string by length
Intermediate
β
Array.prototype.find() β find in range
Intermediate
β
Array.prototype.findIndex() β index of first match
Beginner
β
Array.prototype.findIndex() β find object index by id
Intermediate
β
Array.prototype.findIndex() β returns -1 when not found
Beginner
β
Array.prototype.findIndex() β find string index by length
Intermediate
β
Array.prototype.findIndex() β find by property vs reference
Advanced
β
Array.prototype.findLast() β find last even number
Beginner
β
Array.prototype.findLast() β last active user
Intermediate
β
Array.prototype.findLast() β returns undefined when not found
Beginner
β
Array.prototype.findLast() β last short string
Intermediate
β
Array.prototype.findLast() β first vs last match
Intermediate
β
Array.prototype.findLastIndex() β index of last even
Beginner
β
Array.prototype.findLastIndex() β last active user index
Intermediate
β
Array.prototype.findLastIndex() β returns -1 when not found
Beginner
β
Array.prototype.findLastIndex() β last long string index
Intermediate
β
Array.prototype.findLastIndex() β last duplicate index
Advanced
β
Array.prototype.flat() β flatten one level
Beginner
β
Array.prototype.flat() β flatten to any depth
Intermediate
β
Array.prototype.flat() β flatten two levels
Intermediate
β
Array.prototype.flat() β remove falsy and flat
Intermediate
β
Array.prototype.flat() β configurable depth
Advanced
β
Array.prototype.flatMap() β duplicate each element
Beginner
β
Array.prototype.flatMap() β split sentences into words
Intermediate
β
Array.prototype.flatMap() β double even numbers
Intermediate
β
Array.prototype.flatMap() β expand ranges
Intermediate
β
Array.prototype.flatMap() β compact strings
Advanced
β
Array.prototype.forEach() β sum array elements
Beginner
β
Array.prototype.forEach() β collect property values
Beginner
β
Array.prototype.forEach() β mutate array in-place
Intermediate
β
Array.prototype.forEach() β always returns undefined
Intermediate
β
Array.prototype.forEach() β implement map manually
Intermediate
β
Array.prototype.includes() β check for a value
Beginner
β
Array.prototype.includes() β check for a word
Beginner
β
Array.prototype.includes() β finding NaN
Intermediate
β
Array.prototype.includes() β search from index
Intermediate
β
Array.prototype.includes() β finding null
Intermediate
β
Array.prototype.indexOf() β find first index
Beginner
β
Array.prototype.indexOf() β returns -1 when not found
Beginner
β
Array.prototype.indexOf() β find word index
Beginner
β
Array.prototype.indexOf() β search from index
Intermediate
β
Array.prototype.indexOf() β find first duplicate value
Intermediate
β
Array.prototype.join() β join with comma-space
Beginner
β
Array.prototype.join() β custom separator
Beginner
β
Array.prototype.join() β build a file path
Intermediate
β
Array.prototype.join() β default separator
Beginner
β
Array.prototype.join() β build an HTML list
Intermediate
β
Array.prototype.keys() β convert iterator to array
Beginner
β
Array.prototype.keys() β count the keys
Beginner
β
Array.prototype.keys() β keys over sparse arrays
Intermediate
β
Array.prototype.keys() β iterate with forβ¦of
Intermediate
β
Array.prototype.keys() β build an index map
Advanced
β
Array.prototype.lastIndexOf() β find last position
Beginner
β
Array.prototype.lastIndexOf() β returns -1 when not found
Beginner
β
Array.prototype.lastIndexOf() β search from a given index
Intermediate
β
Array.prototype.lastIndexOf() β detect duplicate values
Intermediate
β
Array.prototype.lastIndexOf() β collect all occurrences
Advanced
β
Array.prototype.length β read the length
Beginner
β
Array.prototype.length β empty array has length 0
Beginner
β
Array.prototype.length β truncate by setting length
Intermediate
β
Array.prototype.length β extend with sparse holes
Intermediate
β
Array.prototype.length β length after pushing elements
Intermediate
β
Array.prototype.map() β double each number
Beginner
β
Array.prototype.map() β convert numbers to strings
Beginner
β
Array.prototype.map() β pluck a property from objects
Intermediate
β
Array.prototype.map() β use the index parameter
Intermediate
β
Array.prototype.map() β parse strings to numbers
Intermediate
β
Array.prototype.pop() β remove and return last element
Beginner
β
Array.prototype.pop() β returns undefined for empty array
Beginner
β
Array.prototype.pop() β verify array is mutated
Intermediate
β
Array.prototype.pop() β implement a stack pop
Intermediate
β
Array.prototype.pop() β remove the last word
Intermediate
β
Array.prototype.push() β add to end
Beginner
β
Array.prototype.push() β push multiple values
Beginner
β
Array.prototype.push() β return value is the new length
Intermediate
β
Array.prototype.push() β build an array with a loop
Intermediate
β
Array.prototype.push() β collect evens with forEach
Intermediate
β
Array.prototype.reduce() β sum all elements
Beginner
β
Array.prototype.reduce() β product of all elements
Beginner
β
Array.prototype.reduce() β flatten nested arrays
Intermediate
β
Array.prototype.reduce() β count word occurrences
Intermediate
β
Array.prototype.reduce() β find the maximum value
Intermediate
β
Array.prototype.reduceRight() β sum from right
Beginner
β
Array.prototype.reduceRight() β flatten from right
Intermediate
β
Array.prototype.reduceRight() β join words in reverse order
Intermediate
β
Array.prototype.reduceRight() β function composition
Advanced
β
Array.prototype.reduceRight() β build a nested object
Advanced
β
Array.prototype.reverse() β non-mutating reverse
Beginner
β
Array.prototype.reverse() β reverse characters of a string
Beginner
β
Array.prototype.reverse() β in-place mutation
Intermediate
β
Array.prototype.reverse() β reverse word order in a sentence
Intermediate
β
Array.prototype.reverse() β check if array is a palindrome
Advanced
β
Array.prototype.shift() β remove and return the first element
Beginner
β
Array.prototype.shift() β shifting an empty array
Beginner
β
Array.prototype.shift() β mutation and same reference
Intermediate
β
Array.prototype.shift() β dequeue from a queue
Intermediate
β
Array.prototype.shift() β consume the first word
Intermediate
β
Array.prototype.slice() β basic slice
Beginner
β
Array.prototype.slice() β shallow copy
Beginner
β
Array.prototype.slice() β last N elements
Intermediate
β
Array.prototype.slice() β first N elements
Beginner
β
Array.prototype.slice() β remove first and last
Intermediate
β
Array.prototype.some() β check for negatives
Beginner
β
Array.prototype.some() β long string check
Beginner
β
Array.prototype.some() β empty array behaviour
Beginner
β
Array.prototype.some() β find an admin user
Intermediate
β
Array.prototype.some() β detect duplicates
Intermediate
β
Array.prototype.sort() β alphabetical order
Beginner
β
Array.prototype.sort() β numeric ascending
Beginner
β
Array.prototype.sort() β numeric descending
Intermediate
β
Array.prototype.sort() β sort objects by property
Intermediate
β
Array.prototype.sort() β stable sort by last name
Advanced
β
Array.prototype.splice() β remove an element
Beginner
β
Array.prototype.splice() β insert an element
Intermediate
β
Array.prototype.splice() β replace an element
Intermediate
β
Array.prototype.splice() β capture removed elements
Intermediate
β
Array.prototype.splice() β replace a range
Advanced
β
Array.prototype.toReversed() β immutable reverse
Beginner
β
Array.prototype.toReversed() β no mutation
Intermediate
β
Array.prototype.toReversed() β reverse string array
Intermediate
β
Array.prototype.toReversed() β new reference
Intermediate
β
Array.prototype.toReversed() β empty array
Beginner
β
Sort Array Immutably
Beginner
β
toSorted Does Not Mutate
Intermediate
β
Sort Strings Lexicographically
Beginner
β
Sort by String Length
Intermediate
β
toSorted Returns a New Reference
Intermediate
β
Remove Element Immutably
Beginner
β
Insert Element Immutably
Intermediate
β
toSpliced Does Not Mutate
Intermediate
β
Replace Element Immutably
Intermediate
β
toSpliced Returns a New Array
Intermediate
β
Convert Number Array to String
Beginner
β
Convert String Array to String
Beginner
β
toString Equals join with Comma
Intermediate
β
toString with Nested Arrays
Intermediate
β
toString of Empty Array
Beginner
β
Add Element to Start of Array
Beginner
β
Prepend Multiple Elements
Beginner
β
unshift Returns the New Length
Intermediate
β
unshift Mutates the Array
Intermediate
β
Implement a Queue with unshift
Intermediate
β
Get Array Values as Array
Beginner
β
Iterate with values()
Beginner
β
Compare values() and keys()
Intermediate
β
Spread an Array Values Iterator
Intermediate
β
values() Is the Default Iterator
Advanced
β
Replace Element at Index
Beginner
β
Replace Last Element
Intermediate
β
Verify No Mutation
Intermediate
β
Confirm New Array Reference
Intermediate
β
Apply Multiple Replacements
Advanced
β
Localize a Number Array
Beginner
β
Format Amounts as Currency
Intermediate
β
Format an Array of Dates
Intermediate
β
Mixed Array toLocaleString
Intermediate
β
Empty Array toLocaleString
Beginner