Anyone who can better this code ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Anyone who can better this code ?

As of now, I don't know much about guideline, conventions and what not in javascript or just aspects of programming principals in general which are transcedental. So i need some heelllllpppppppp. Loving the community so far. https://code.sololearn.com/WE92KAyzg1w8/?ref=app

27th Aug 2022, 4:20 PM
Dhanraj Tamang
Dhanraj Tamang - avatar
1 Answer
+ 1
your code will fail if arr=[0,1,2,3] you can use forEach loop for that . array=[0,1,2,3]; array.forEach(el=>console.log(el));
4th Sep 2022, 5:34 PM
Prashanth Kumar
Prashanth Kumar - avatar