Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

West-Midlands_Class-3_HASEEB-KHALIL_JavaScript_2-Week_3#100

Open
Haseeb-Khalil wants to merge 1 commit intoCodeYourFuture:mainfrom
Haseeb-Khalil:main
Open

West-Midlands_Class-3_HASEEB-KHALIL_JavaScript_2-Week_3#100
Haseeb-Khalil wants to merge 1 commit intoCodeYourFuture:mainfrom
Haseeb-Khalil:main

Conversation

@Haseeb-Khalil
Copy link

All projects have been completed apart from "Alarm clock"
Unable to make it's stop button to stop the alarm sound.
As soon as I get an idea of how to do that. I'll update my code

Your Details

  • Your Name: Haseeb Khalil
  • Your City: Coventry
  • Your Slack Name: Haseeb Khalil

Homework Details

  • Module: JS-2
  • Week: 3

All projects have been completed apart from "Alarm clock"
Unable to make it's stop button to stop the alarm sound.
As soon as I get an idea of how to do that. I'll update my code
@Professional-Kate
Copy link

This is really good work, Haseeb! I really love your use of comments so it's really easy to read!

If you want a bit of help with that stopAlarm() function, the issue is that the alarmTimeOut variable is locked in the scope of setAlarm. This means that the stopAlarm function can't see it and use it. A way to fix this would either be making a variable in the global scope, so all code blocks can see it, or by moving that stopAlarm function inside of the setAlarm one.

Copy link

@Sinead-CYF Sinead-CYF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job Haseeb 👍

One of my favourite CSS features in the DOM is classList, I also use ems & rems a lot so things are responsive from the outset :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants