what is comma trailing in javascript

const army = {
    name: 'karan',
    memb : [
        {
            captain: 'suraj',
        },
        {
            rifleMan: 'sanjay'
        },
        {
            grenadier: 'yogesh'
        }
    ]
}

const { name , memb:[, cap]} = army

console.log("cap ", cap)

it gives log ” cap { rifleMan: ‘sanjay’ } “, can anyone please explain this concept and what it is called