+ 1
Why doesn’t it work?
Tell me please how to make my code work? https://code.sololearn.com/WjnpmaGJ1GXN/?ref=app
8 odpowiedzi
+ 4
https://code.sololearn.com/W63PdQeIyIOw/?ref=app
Никита Шиляев do you want something just like this? 🤓
+ 15
Никита Шиляев My solution
function func(sTring){
var z
for (let i=1; i<=sTring.length; i++) {
z=sTring.slice(1)+sTring.slice(0,1)+"<br>";
}
document.write(z)
}
func("Hello");
+ 12
Никита Шиляев Code's name is sum arr but your code is not even close for something like that☺ Anyway logic behind your code is completely wrong.
You cannot loop over undefined array length☺
What is your goal? Tell me and I'll try to help you.
+ 11
Никита Шиляев I don't understand,sorry
+ 1
r8w9, thank you for your answer! please dont pay attention to the title or comments above, I’m wondering to launch loop and function inside it. Take a look at this please)
+ 1
yep, now it’s cool! thank you! Could you give me a hint how to apply this function to every subsequent iteration? like every next result should be the changed version of the previous one
0
Roneel, exactly) thank you!
0
Thank you for ask