JSFiddle - React, Tailwind, and code Playground

by vaibhav2812

JavaScript

/* var chain = new ChainingOper(3) */

var animals = ["cat", "dog", "fish"];
var threeLetterAnimals = [];
for (let count = 0; count < animals.length; count++) {
  if (animals[count].length === 3) {
    animals.push(animals[count]);
  }
}
cosnole.log(threeLetterAnimals);