Git Product home page Git Product logo

Berhane Yohannes's Projects

countdown-alarm icon countdown-alarm

# Make an Alarm Clock In this folder you will find the basic setup of an alarm clock. You should only change code in the `alarmclock.js` file. ## How the clock should work When you click the `Set Alarm` button the counter at the top of the screen should change to the number you entered in the `input` field. For example, if the `input` field says `10` then the title should say `Time Remaining: 00:10`. Every one second the title should count down by one. When the `Time Remaining` reaches `00:00` the alarm should play a sound. You can make the sound happen by using `playAlarm()`. You can stop the alarm sound by pressing the `Stop Alarm` button. ## Need Help? Only read this section if you really need to! It's good to work this out for yourself. ### Hints - Have you tried looking at the `setInterval` function? ### Steps to complete 1. When the `Set Alarm` button is clicked, get the value of the input field 2. When you have the input field value, set the title to the correct value 3. Work out how to update the `Time Remaining` title every second 4. When the remaining time left is 0, play the alarm sound ## Extra Tasks If you have time and want to do more why not try - Make the background change color when the alarm clock finishes - Try making the background flash! - Could you add `pause` functionality so that the count down stops and then you restart it later?

countries-react icon countries-react

Frontend Mentor's REST Countries API with color theme switcher (React)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.