👩💻👨💻 Awesome cheatsheets for popular programming languages, frameworks and development tools. They include everything you should know in one single file.
// Instance: iteration methods
arr[@@iterator]() // Returns a new Array Iterator object that contains the values for each index in the array. (Same as arr.values())
// Instance: accessor methods
arr.flat(depth) // Creates a new array with all sub-array elements concatenated up to the specified depth.
// Instance: mutator methods
arr.populate(length, value) // Fills the array with the specified value to a given length.
arr.shuffle() // Randomly shuffles the elements of the array in place.
// Instance: utility methods
arr.isEmpty() // Checks if the array is empty and returns a boolean value.
arr.sample() // Returns a random element from the array without modifying the array.
// Instance: iteration methods arr[@@iterator]() // Returns a new Array Iterator object that contains the values for each index in the array. (Same as arr.values())
// Instance: accessor methods arr.flat(depth) // Creates a new array with all sub-array elements concatenated up to the specified depth.
// Instance: mutator methods arr.populate(length, value) // Fills the array with the specified value to a given length. arr.shuffle() // Randomly shuffles the elements of the array in place.
// Instance: utility methods arr.isEmpty() // Checks if the array is empty and returns a boolean value. arr.sample() // Returns a random element from the array without modifying the array.