-
Given an array of numbers, write a function that calculates the average of the numbers.
-
Given an array of numbers, write a function that finds the maximum number in the array.
-
Given an array of numbers, write a function that filters out the even numbers and returns a new array containing only the odd numbers //filter
-
Given an array of strings, write a function that removes duplicates and returns a new array containing only the unique strings.
-
Reverse string: Write a function that takes a string as an argument and returns the string reversed. You can use string methods such as split(), reverse(), and join() to accomplish this task.
-
Given an array of intervals, merge overlapping intervals and return a new array of merged intervals. Each interval is represented as an array of two integers, where the first element is the start of the interval and the second element is the end of the interval.
- Given an array of numbers, return an array where each element is the product of all the elements in the original array except the current element.
- Give the array below (in articles.js)
Q: sort without mutating based on
a) upvotes (ascending order) b) date (desc/backwards-- latest date first)