Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript

Tushar Singh
PLUS
Tushar Singh
Courses Plus Student 8,692 Points

clock

http://codepen.io/tushar_13/pen/zqPQOp

I am trying to build a pomodoro clock and I want when I click the circle(id="clock") to start the timer and if I again click it, it will stop.

But obviously it is not working, nothing is working really(nothing at all).

I am missing something, just not sure what!

Any help would be really appreciated.

2 Answers

Seth Kroger
Seth Kroger
56,407 Points

A lot of your if statements are using single equal signs (assignment) instead of triple equal signs (equality). Your if statements won't work as a result and are changing variables when you aren't expecting them to be changed.

Tushar Singh
PLUS
Tushar Singh
Courses Plus Student 8,692 Points

It worked lol, such a dumb mistake to make and I have literally gone through the code probably 100 times and I missed it every single time, I don't know how.

Thanks a lot

Konrad Pilch
Konrad Pilch
2,435 Points

Thats cool! How long have you been learning jQuery? A month? 30days?

Tushar Singh
Tushar Singh
Courses Plus Student 8,692 Points

I am working on it, I hate the designing part really. Now I want to add an audio element when the timer is 0 and instructions of what to do when a user hovers his mouse on the clock and change according to the situation whether the user has stopped the clock or still running, that should be easy I guess.

ya approx 20-30 days, I am thinking we should build a game now, may be tic-tac-toe. What do you say?

Konrad Pilch
Konrad Pilch
2,435 Points

Well, I started on Monday. I need few more days to understand the higher logic :D but im getting there. Id see how far i get tomorrow.

Yeah! Thatll be cool! Do you want to join slack group? would be easier to communicate, and we can always work with on projects, atm we shoudl start one on monday. If yoru interested http://newdevelopersteam.herokuapp.com/ .

Tic tac toe, and then we could make some jQuery game more advanced :D nice learning experience for both of us. Iv seen your codepen. They are nice! You learned a lot. How do you even learn?

Tushar Singh
Tushar Singh
Courses Plus Student 8,692 Points

Actually jQuery is not that much difficult, MDN really solves all your problems.

You started a week ago yet you are far ahead of me, we are exploring different worlds of JS really. You like to work on the interactivity and I like how the particular app runs(the logic behind it). I guess we can help each other out. I saw ywhat you were doing with those shapes and colors in codepen, it was fuckin' sweet.

I just think of something anything to build, I do not overthink much before starting the particular project. For eg When I said tic tac toe, I din't even think about it lol. I start building anything and solve the problems that come in my way.

I would love to build a complicated game :wink: something like clash of clans hehehe(I am a COC fan).

Tushar Singh
Tushar Singh
Courses Plus Student 8,692 Points

I have joined this slack thing although it looks a bit confusing. By the way, when I received the mail for the confirmation, it says Kevin Korte. Why do I think I know this name from somewhere lol