javascript how to remove every 3rd element from an array -
How do I remove every 3 elements from an array?
var TheArray = ['How can I make it without creating one without saying "Hello"? New array?
Try this:
for (var i = 2; I & lt; = TheArray.length; i + = 2) TheArray.splice (i, 1); If you want a string at the end, then just use TheArray.join ("") .
Comments
Post a Comment