@RayaneBengaoui
Posted
Hello Tin.Pham,
Congrats for completing already another challenge ! 🙂
As @Karin1996 said, you must set min-height: 100vh
because here you declared min-height: calc(100vh - 2rem)
.
Also, try to make the image part bigger to match the design.
Moreover, on the JS slider part there is a little bug when pressing buttons it doesn't swap directly. You should rethink your count variable, for example, it is initialized at -1, if I click on the previous button it will check if it's lower than 0. It is, thus, count will be set to 3 and after that your do count--
which is equal to count = 2
. However people[2]
doesn't exist (you have people[0]
people[1]
and you get an error.
So the logic here is not good, but I'm sure you can figure out by yourself to make it work. Try to identify all the special cases and then try to run with multiple console.log to be sure to understand what happen underthehood. I personally like to use paper for algorithms
Overall, well done for the challenge and happy coding ! 😃
@tin-pham
Posted
@RayaneBengaoui Oh Thank you so much ^ ^, I will fix my JS