how to check if element exists cypress

JavaScript
Cypress._.times(100, (i) => {
  it(`num ${i + 1} - test the thing conditionally`, () => {
    // do the conditional bits 100 times
  })
})

Source

Also in JavaScript: