Myfunction.shift() is not function

Hi I am doing some code but have got myfunction.shift() is not function

Code is here:
const array = cy.get(’#someID’).children()

    .then(function(array){
        console.log(array)
        const shiftArray = array.map((function(){ return this.label;}))
        console.log(shiftArray)

    shiftArray.shift()
    })


        .then(($cells) => Cypress._.map($cells, 'innerText'))
        //     // .then((strings) => Cypress._.map(strings, (s) => new Date(s)))
        .should('not.be.sorted')
})
})

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.