Status: Not Started
  • scratchpad.js
  • Unit Test
Font Size
14
Parentheses autocomplete
Wrap lines
Editor
Theme
Code with blocks by default
Auto-Format
Console Font Size
12
Console Theme
Show File Tab Bar
Code Running Environment

Use the newest vesion of the JavaScript library.

Alarm Snoozes
Unit Test
function countAlarmsInHour(interval) {
// Your code here
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Output
Grading
Docs
Exercise
More
 
Pass Test Message

Errors:

This student is viewing this assignment in English. View this page in English?

5 points

You’re trying to wake up, but you keep hitting the snooze button. The alarm rings at minute 0, and then rings again every interval minutes, which decreases by 1 each time (but not below 1 minute). Write a function countAlarmsInHour that counts how many times the alarm rings within 60 minutes.

The function should take one parameter:
- interval (integer, initial snooze interval in minutes)

It should return the number of times the alarm rings.

Reset Code

Slides and Notes

No slides available for this video

About

JavaScript (function)