How can variables created dynamically in a for loop be assigned dynamically?

clipboard.png

                    for(var i=0;i<mydata.length;iPP){
                               var field = "field" + i;//field0 field1 field2 field3
                              field=mydata[i].CREW_NAME;//12 3 4
                              console.log(field);
                                    }

how do I make field0 equal to Unit 1 and so on?
/ / console.log (field0);
/ / console.log (field1);

Mar.22,2021

  var mydata =[
            {
                CREW_NAME:'1',
            },
            {
                CREW_NAME:'2',
            },
            {
                CREW_NAME:'3',
            },
            {
                CREW_NAME:'4',
            }

        ];
        var field=[];
        mydata.forEach( (item)=> {
            field.push(item.CREW_NAME)
        });
        console.log(field[0]);
        console.log(field[1]);
        console.log(field[2]);
        console.log(field[3]);
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e50587-450b8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e50587-450b8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?