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
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));