Skip to content

Latest commit

 

History

History
48 lines (48 loc) · 1.69 KB

File metadata and controls

48 lines (48 loc) · 1.69 KB

Arrays Find the average of even numbers in an array. Find the sum of odd numbers in an array. Find the sum of prime numbers in an array. Find the sum of positive numbers in a mixed array. Sum all elements of an array. Calculate the sum of an array. Reverse an array. Reverse an array in-place. Reverse an array without built-in methods. Reverse an array without using a second array. Reverse an array and multiply the first half by 2 and the second half by 5. Find the second largest element. Find the highest even number using reduce(). Find the highest odd number. Find/remove duplicate elements. Remove duplicate even numbers. Remove multiples of 3. Remove odd numbers. Remove adjacent odd numbers. Replace odd numbers with their squares. Find common elements from two arrays. Concatenate two arrays. Merge two arrays manually. Merge two arrays using apply(). Add an element without push() or unshift(). Remove the last element without pop(). Shift all elements one position left. Rotate an array n times. Sort an array manually (without sort()). Check if an element exists without includes(). Find first occurrence of a target. Find all occurrences of a target. Find max/min without Math.max() or Math.min(). Find the frequency of elements. Count the number of 1s in numbers. Flip the sign of numbers using forEach(). Sum values using while, forEach, and reduce. FizzBuzz. Find pairs whose sum equals a target. Find two numbers whose sum is closest to zero. Remove the nth element. Remove the second-last element. Insert an element at a specific index. Find the first 5 multiples of 3 using while. Print even numbers from 20 to 2 using while. Find the length of an array without using .length. Remove duplicates using reduce().