+ 1

In one of my projects I can't understand how to do it.

I am creating an Image Slider, But i can't understand how to solve it. I have a long list of images so I can't use this type to create it. https://code.sololearn.com/WsIGJmlzim2O/?ref=app ‱>> sry for bad eng😎.

25th May 2023, 12:45 PM
Raja Rawat
Raja Rawat - avatar
1 Answer
+ 2
Raja Rawat Not a solution, but hints to make your code cleaner and easier to write and debug: 1. You don't need an array and an if/else block only to wrap numbers to keep them inside a range. Study modulo math operator. 2. You have lots of lines with the same statements and formulae. Think a bit deeper and use for loops Instead.
25th May 2023, 4:56 PM
Emerson Prado
Emerson Prado - avatar