|
| 1 | +#1: Print in Console numbers from 1 to 10 |
| 2 | +#2: Print in Console the odd numbers less than 100 |
| 3 | +#3: Print in Console the multiplication table with 7 |
| 4 | +#4: Calculate the sum of numbers from 1 to 10 |
| 5 | +#5: Calculate 10! |
| 6 | +#6: Calculate the sum of odd numbers greater than 10 and less than 30 |
| 7 | +#7: Calculate the sum of numbers in an array of numbers |
| 8 | +#8: Calculate the average of the numbers in an array of numbers |
| 9 | +#9: Find the maximum number in an array of numbers |
| 10 | +#10: Create a function that receives an array of numbers and returns an array containing only the positive numbers |
| 11 | +#11: Print in Console all the multiplication tables with numbers from 1 to 10 |
| 12 | +#12: Create a function that will convert from Celsius to Fahrenheit |
| 13 | +#13: Create a function that will convert from Fahrenheit to Celsius |
| 14 | +#14: Print in Console the first 10 Fibonacci numbers without recursion |
| 15 | +#15: Create a function that will find the nth Fibonacci number using recursion |
| 16 | +#16: Create a function that will return a Boolean specifying if a number is prime |
| 17 | +#17: Calculate the sum of digits of a positive integer number |
| 18 | +#18: Print in Console the first 100 prime numbers |
| 19 | +#19: Create a function that will return in an array the first "nPrimes" prime numbers greater than a particular number "startAt" |
| 20 | +#20: Rotate an array to the left 1 position |
| 21 | +#21: Rotate an array to the right 1 position |
| 22 | +#22: Reverse an array |
| 23 | +#23: Reverse a string |
| 24 | +#24: Create a function that will merge two arrays and return the result as a new array |
| 25 | +#25: Create a function that will receive two arrays of numbers as arguments and return an array composed of all the numbers that are either in the first array or second array but not in both |
| 26 | +#26: Create a function that will receive two arrays and will return an array with elements that are in the first array but not in the second |
| 27 | +#27: Create a function that will receive an array of numbers as argument and will return a new array with distinct elements |
| 28 | +#28: Calculate the sum of first 100 prime numbers |
| 29 | +#29: Print in Console the distance between the first 100 prime numbers |
| 30 | +#30-a: Create a function that will add two positive numbers of indefinite size. The numbers are received as strings and the result should be also provided as string. |
| 31 | +#31a. Create a function that will return the number of words in a text |
| 32 | +#32. Create a function that will capitalize the first letter of each word in a text |
| 33 | +#33. Calculate the sum of numbers received in a comma delimited string |
| 34 | +#34. Create a function that will return an array with words inside a text |
| 35 | +#35. Create a function to convert a CSV text to a “bi-dimensional” array |
| 36 | +#36. Create a function that converts a string to an array of characters |
| 37 | +#37. Create a function that will convert a string in an array containing the ASCII codes of each character |
| 38 | +#38. Create a function that will convert an array containing ASCII codes in a string |
| 39 | +#39. Implement the Caesar cypher |
| 40 | +#40. Implement the bubble sort algorithm for an array of numbers |
| 41 | +#41. Create a function to calculate the distance between two points defined by their x, y coordinates |
| 42 | +#42. Create a function that will return a Boolean value indicating if two circles defined by center coordinates and radius are intersecting |
| 43 | +#43. Create a function that will receive a bi-dimensional array as argument and a number and will extract as a unidimensional array the column specified by the number |
| 44 | +#44. Create a function that will convert a string containing a binary number into a number |
| 45 | +#45. Create a function to calculate the sum of all the numbers in a jagged array (array contains numbers or other arrays of numbers on an unlimited number of levels) |
| 46 | +#46-a. Find the maximum number in a jagged array of numbers or array of numbers |
| 47 | +#47. Deep copy a jagged array with numbers or other arrays in a new array |
| 48 | +#48. Create a function to return the longest word(s) in a string |
| 49 | +#49. Shuffle an array of strings |
| 50 | +#50. Create a function that will receive n as argument and return an array of n unique random numbers from 1 to n. |
| 51 | +#51. Find the frequency of characters inside a string. Return the result as an array of objects. Each object has 2 fields: character and number of occurrences. |
| 52 | +#52. Calculate Fibonacci(500) with high precision (all decimals) |
| 53 | +#53. Calculate 70! with high precision (all digits) |
| 54 | + |
| 55 | + |
| 56 | +#01. Create a function that takes two numbers as arguments and return their sum. |
| 57 | +#02. Write a function that takes an integer minutes and converts it to seconds. |
| 58 | +#03. Create a function that takes a number as an argument, increments the number by +1 and returns the result. |
| 59 | +#04. Write a function that takes the base and height of a triangle and return its area. |
| 60 | +#05. Create a function that takes the age in years and returns the age in days. |
| 61 | +#06. Create a function that takes an array containing only numbers and return the first element. |
| 62 | +#07. Create a funtion that takes vooltage and current and returns the calculated power. |
| 63 | + |
| 64 | + |
| 65 | +##Array Problem Solving |
| 66 | +01. Create a function that takes an array containing only numbers and return the first element. |
| 67 | +02. Given two arguments, return an array which contains these two arguments. |
| 68 | +03.Given an object containing counts of both upvotes and downvotes, return what vote count should be displayed. This is calculated by subtracting the number of downvotes from upvotes. |
| 69 | +04. Write a function to reverse an array. |
| 70 | +05. You can assign variables from arrays like this: |
| 71 | +const arr = [1, 2, 3, 4, 5, 6] |
| 72 | +let a = arr[0] |
| 73 | +let b = arr[1] |
| 74 | + |
| 75 | +console.log(a) // outputs 1 |
| 76 | +console.log(b) // outputs 2 |
| 77 | +With ES6, you can assign variables from arrays in a much more succinct way. Create variables a and b from the given array using the ES6 destructuring assignment syntax, where a === 1 and b === 2. |
| 78 | + |
| 79 | +06. Create a function that accepts an array and returns the last item in the array. |
| 80 | +07. Create a function that takes an array and returns the types of values (data types) in a new array. |
| 81 | +08. Create a function that takes an array of integers and strings. Convert integers to strings and return the new array. |
| 82 | +09. Create a function to concatenate two integer arrays. |
| 83 | +10. Create a function that takes two numbers num1, num2, and an array arr and returns an array containing all the numbers in arr greater than num1 and less than num2. |
| 84 | +11. Create a function that finds the index of a given item. If the item is not present, return -1. |
| 85 | +12. Rotate the Array by One Given an array, rotate the values clockwise by one (the last value is sent to the first position). |
| 86 | +13. Check if an Array Contains a Given Number Write a function to check if an array contains a particular number. |
| 87 | +14. Array of Strings to Array of Numbers Create a function that takes as a parameter an array of "stringified" numbers and returns an array of numbers. |
| 88 | +15. Multiply Every Array Item by Two Create a function that takes an array with numbers and return an array with the elements multiplied by two. |
| 89 | +16. Array of Word Lengths Create a function that takes an array of words and transforms it into an array of each word's length. |
| 90 | +17. Find the Smallest and Biggest Numbers Create a function that takes an array of numbers and return both the minimum and maximum numbers, in that order. |
| 91 | +18. Number Split Given a number, return an array containing the two halves of the number. If the number is odd, make the rightmost number higher. |
| 92 | +19. Filter out Strings from an Array Create a function that takes an array of non-negative integers and strings and return a new array without the strings. |
| 93 | +20. Sort by String Length Create a function that returns an array of strings sorted by length in ascending order. |
| 94 | +21. Converting Objects to Arrays Write a function that converts an object into an array, where each element represents a key-value pair in the form of an array. |
| 95 | +22. Array of Multiples Create a function that takes two numbers as arguments (num, length) and returns an array of multiples of num until the array length reaches length. |
| 96 | + |
0 commit comments