# Table cell index

<table>
  <thead>
    <tr>
      <th>Firstname</th>
      <th>Lastname</th>
      <th>Age</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Jill</td>
      <td>Smith</td>
      <td>50</td>
    </tr>
  </tbody>
</table>
Firstname Lastname Age
Jill Smith 50

Invoke the jQuery .index() method to confirm the "Age" column is 3rd in this table.

cy.contains('th', 'Age').invoke('index').should('equal', 2)