JSFiddle - React, Tailwind, and code Playground
by luka kupunia
JavaScript
function everySecond(arr){
var result = [];
for(var i = 0; i < arr.length; i++){
if(i % 2 != 0){
result.push(arr[i]);
}
}
console.log(result)
}
everySecond([ 23 , 34 , 43 , 65 ]);