📄️ Arrays
Array allows you to store multiple elements in a single variable. You can store strings, arrays, numbers, booleans, objects.
📄️ Empty array
Complete the function getEmptyArray such that it returns an empty array.
📄️ Number of elements
Complete the function getNumberOfElements such that it returns the number of elements in the array.
📄️ Push a string I
Complete the `toPushString` function so that it adds the "Processor" string to the "arr" array it receives.
📄️ Push a string II
Complete the function `toPushString` so that the "str" variable is added to the "arr" array.
📄️ Get first element
Complete the function `getFirstElement` so that it returns the first element of the "arr" array passed as a parameter.
📄️ Get last element
Complete the function `getLastElement` so that it returns the last element of the "arr" array passed as a parameter.
📄️ Array foreach
Assume we have an array of ages and you want to loop (or iterate) through each item in the array.
📄️ Loop through array elements
Complete the function `loopThroughElements` so that it iterates through each item in the array it receives and logs it to the console.
📄️ Log user ages
Complete the function `toLogUserAges` so that it iterates through each item in the "userAges" array it receives and logs it to the console.
📄️ Return confusion
In this lesson, we'll go over a common misunderstanding about returning within a function that contains a .forEach() call.
📄️ Total price
Complete the function `sumPrices` so that it returns the sum of all price in the "prices" array.
📄️ Sum positive numbers
Complete the function `sumPositiveNumbers` such that it returns the sum of all positive numbers from the "numbers" array it receives.
📄️ Sum odd numbers
Complete the function `sumOddNumbers` such that it returns the sum of all odd numbers from the "numbers" array it receives.
📄️ Select a player
Complete the `getDropdown` function so that it returns the following HTML.
📄️ Vegetables cart II
Complete the function `renderTableRows` which returns following HTML snippet.