Design comparison
Solution retrospective
Hello friends, I did this challenge using HTML, CSS, & JS. I am looking forward to hear your feedback. I appreciate your time :) Thank you!
Community feedback
- @Kl3vaPosted over 2 years ago
Hi Khadija. A little observation; As my bill increases, it breaks the user interface. Seeing this is a small application, you can try to limit the character length of the bill or make value of the bill total to scroll horizontally within it’s width.
Marked as helpful0 - @Nahid570Posted over 2 years ago
could you please explain "percentage = parseInt(item.innerHTML.slice(0, item.innerHTML.length - 1));" how this line works when I am calculating percentage? by the way, you did a great job.
0@Khadijarejjaoui99Posted over 2 years ago@Nahid570 Hello, thank you so much for your comment. Using this line I am getting the text inside the button, but only a part of it. And this by using the slice method, that extract a part of a string. For example if the text inside the button is 15%, I want only to get 15. That's why I started the slice at index 0 and I ended it at length-1 which is exclusive. To know more about slice you can check this link: https://www.w3schools.com/jsref/jsref_slice_string.asp And by using parseInt I convert it from a string to an integer.
I hope that I explained it well. If not please let me know so that I can try to clarify it more.
0@Nahid570Posted over 2 years ago@Khadijarejjaoui99 Thank you so much for you valuable info. I understand this, from here I get all the button values how all this values works later I didn't understand. If you don't mind can I ask you something?
0@Nahid570Posted over 2 years ago@Khadijarejjaoui99 I am sorry for asking that, you don't even know me. It seems like you also started Frontend mentor not so long. Can we collaborate?
0@Khadijarejjaoui99Posted over 2 years ago@Nahid570 Yes, I am kind of new here. Currently I collaborate only with my collegemates, because I don't have that much time. If I get some extra time I will let you know so that we can collaborate. Thank you so much for your understanding!
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord