Latest comments
- @domdem-dev@ktzazz
It works, congrats!
- @ErfanTkh21@ktzazz
You're missing the error state design, other than that, very good job :)
- P@Capt-Rong
- @CristhianProgramming
- P@rmmcfarlinWhat are you most proud of, and what would you do differently next time?
I am happy to have gotten pretty close to the solution. I think my javascript could have been a lot cleaner and there were probably more efficient ways to handle the different functions, but as a beginner I think I did okay. I would probably plan out my javascript better and start with pseudocode instead of just going along and adding as I discovered I was missing functionality.
What challenges did you encounter, and how did you overcome them?The main task was how to have the function run from interacting with either number input or any of the buttons, while also pulling the percentage from the corresponding button that had been activated. I ended up having an active / inactive class setup for the buttons, so the main function would pull from whichever button had been clicked last while still running the function on input when typing into either number input.
What specific areas of your project would you like help with?Any general suggestions, especially on how to get cleaner and more efficient javascript. I know I have some repetition and inefficiencies there for sure.
@ktzazzwow you solved the challenge perfectly, congrats :D I was having trouble with the script, specially with the percentages but I did my research and found that using the method "forEach" could make the code more efficient. Good job!
- @percydocomoWhat are you most proud of, and what would you do differently next time?
Accessing data file using the fetch() method and using JavaScript to manipulate HTML elements in order to display the data retrieved from the json file.
What challenges did you encounter, and how did you overcome them?I was unable to grab the button data in a function that was created to display the json file data at first. I then created 2 functions specifically to grab the 2 different button data needed for the display. I also have 3 event listeners for the 3 buttons. Everything worked out fine but the JavaScript is a bit long. My final solution is to first grab all the buttons in an array and use the forEach() method to apply all the operations. The file is much shorter now.
What specific areas of your project would you like help with?all feedback is welcome!
@ktzazzIt works perfectly, keep it up congrats! :D