CJCoding With Joseph
15free / daySign inCreate account

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, so print one after the last line.

Hints4 available
Topics
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.