javascript how to remove every 3rd element from an array
arrays, javascript
Solution
Try this:
for (var i = 2; i <= TheArray.length; i += 2)
TheArray.splice(i, 1);
If you want a string in the end, just use `TheArray.join("")`.
Problem
how do i remove every 3rd element from an array? ``` var TheArray = ['h', 'e', 'z', 'l', 'l', 'l', 'o'] ``` How do I make this say "hello" without creating a new array?