CJCoding With Joseph
15free / daySign inCreate account
TitleOpen
26
For Loop: Print Array ItemsUse a for loop to print each item in the fruits array on its own line.
easyNot startedSolve
27
While Loop: Sum an ArrayUse a while loop to find the total of all numbers in the array.
easyNot startedSolve
29
forEach: Print Student NamesUse forEach to print each student name with the prefix "Student: ".
easyNot startedSolve
30
forEach: Calculate Total PriceUse forEach to calculate the total of all prices in the array, then print it.
easyNot startedSolve
31
map: Double Each NumberUse map to create a new array where each number is doubled, then print the result as comma-separated values.
easyNot startedSolve
32
map: Convert Words to UppercaseUse map to convert each word in the array to uppercase, then print them as comma-separated values.
easyNot startedSolve
33
filter: Keep Even NumbersUse filter to keep only the even numbers from the array, then print them as comma-separated values.
easyNot startedSolve
34
filter: Keep Long WordsUse filter to keep words that have 5 or more characters, then print them as comma-separated values.
easyNot startedSolve
35
map + filter: Square Even NumbersUse filter first to keep even numbers, then use map to square them.
easyNot startedSolve
36
forEach: Count Passing ScoresUse forEach and an if statement to count how many scores are 60 or higher, then print the count.
easyNot startedSolve
96
First and Last FruitYou are given an array of fruit names.
easyNot startedSolve
97
Count the ColorsEvery array knows how many elements it holds through its .length property.
easyNot startedSolve
98
Print Every Score with forEachThe forEach method runs a function once for every element in an array.
easyNot startedSolve
99
Double Every Number with mapThe map method builds a brand-new array by transforming each element with a function.
easyNot startedSolve
100
Keep Only the Even NumbersThe filter method builds a new array containing only the elements for which your function returns true.
easyNot startedSolve
101
Add Items to the CartThe push method adds a new element to the end of an array and changes the array in place.
easyNot startedSolve
102
Is the Pet in the List?The includes method returns true or false depending on whether an array contains a value, and indexOf returns the position of a value (or -1 if it is not there).
easyNot startedSolve
103
Square the Even NumbersArray methods can be chained: the result of one becomes the input to the next.
mediumNot startedSolve
104
Sum and Average with forEachYou can use forEach together with a variable that lives outside the loop to build up a running total.
mediumNot startedSolve
105
Report the Hot DaysYou are given an array of daily temperatures.
mediumNot startedSolve