JSFiddle - React, Tailwind, and code Playground

by arbaazshaikh919

JavaScript

var odds = [ 2, 3, 6, 7, 8 ];

    var oddValue = odds.filter((value, index, self) => {
      return self.indexOf(value) % 2 === 0;
    });

console.log(oddValue)