🚀 CYBER WEEK SALE: 50% OFF on JavaScript Fundamentals 💪

Task #250, Stage #5 - Gold Mine

Now, let’s work on the function that will be called if the user clicks the key G on the keyboard. Implement and export the function handleKeyPress(term, state) in the handlers.js....

August 15, 2020 Â· 1 min Â· Coderslang Master

Task #250, Stage #6 - Gold Mine

The handler is ready, so we need to connect it with the keypress event. But before that we need to improve the init function. It accepts a single parameter and should call on it:...

August 15, 2020 Â· 1 min Â· Coderslang Master

Task #250, Stage #7 - Gold Mine

So, now we can start mining gold in manual mode by pressing key ‘G’ key. Let’s print the result of our actions on the screen. Implement and export the function updateGold(term, state) from functions....

August 15, 2020 Â· 1 min Â· Coderslang Master

Task #250, Stage #8 - Gold Mine

Great! The manual mode is done, so we should think about automating our mining empire. Add a new field producers into the config constant that was exported from solution.js. It should be an array of objects....

August 15, 2020 Â· 1 min Â· Coderslang Master

Task #250, Stage #9 - Gold Mine

Now let’s add the ability for the user to purchase new producers. If you’ve created producers with single digit ids, you did everything right. If not, you can still fix it....

August 15, 2020 Â· 1 min Â· Coderslang Master

Task #2501 - Applying colors

The document has already added a title and five colored button elements. When you click on any of the buttons, the text color of the h2 heading should change to the one indicated on the button....

August 15, 2020 Â· 1 min Â· Coderslang Master

Task #2502 - Changing the font size

There are two buttons in the document: + and -. When the + button is clicked, the font size of the .story element should increase by 1px by default. If the current font size of the ....

August 15, 2020 Â· 2 min Â· Coderslang Master

Task #2503 - Fortune cookies

There are three fortune cookies (.cookie) in the document. To read the prediction, you need to open the cookie. When you click on a .cookie, you need to add the opened class to it....

August 15, 2020 Â· 1 min Â· Coderslang Master

Task #2504 - A bit of UX

When dialing a number, it is desirable to highlight the pressed button. When clicking on any button in the index.html file, the pressed class must be added to it for 500ms....

August 15, 2020 Â· 1 min Â· Coderslang Master

Task #2505 - Traffic light

You were given access to control traffic lights in the city. The task you need to solve is to manually control them. To turn on the red light, the .traffic-light element must have a second class stop....

August 15, 2020 Â· 2 min Â· Coderslang Master