const pets = ['Dog', 'Cat', 'Hamster', 'Cat' ,'Squirrel'];

const indexOf = pets.indexOf('Cat', 2);

console.log(indexOf);

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://codepen.io/nullobject/pen/cngzI.js