You can sort arrays of objects. In this case we leverage the collator.compare method and pass along the properties that we want to sort by. Source https://elijahmanor.com/byte/js-locale-sort
This code adds special characters to text to print in color in the console (combined with console.log()). Use template literals and special characters to add the appropriate color code to the string output. For background colors, add a special character that resets the background color at the end of the string. Source https://www.30secondsofcode.org/js/s/colorize
Combine all items in an array into a string, separated by a delimiter that you can pass in as an argument. By default, it will use a comma (,) as the delimiter if one is not provided. Source https://vanillajstoolkit.com/reference/arrays/array-join/
Use Array.prototype.reduce() to increment a counter each time the specific value is encountered inside the array. Source https://www.30secondsofcode.org/js/s/count-occurrences
Two ways to capture the right click on a mouse.
Reverse the order of items in an array. Source https://vanillajstoolkit.com/reference/arrays/array-reverse/
Use Array.prototype.filter() to create a new array that contains every nth element of a given array. Source https://www.30secondsofcode.org/js/s/every-nth
The Object.is() method determines whether two values are the same value.
Take the content of an array and return a single value. That value can be anything: a string, number, object, or even another array.