← Back to Arrays
Question 105
Report the Hot Days
Report the Hot Days
You are given an array of daily temperatures. First use filter to keep only the temperatures that are strictly greater than 30. Then use forEach on the filtered result to print each hot temperature followed by the text " is hot". Finally, print "Hot days: " followed by how many hot days there were.
Expected Output:
32 is hot 35 is hot 41 is hot Hot days: 3
= newline. The output ends with a newline — print one after the last line.
Hints4 available
Sign in to use hintsTopics:
Arrays
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (clog, fn, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.