Es6 map ergodic problem

   
I output the f here twice, why col only outputs it once! Ask for answers

Mar.11,2022

feel that your writing is wrong, try this way:

columns.map((f,i) => {
  console.log('f',f);
  f.map((item.index) => {
      const col = {
        title: this.renderColumnTitle(f),
        dataIndex: 'column' + index,
        key: item._ref,
      };
      console.log('col',col);
  })
})

f is an array? Didn't he just output once?


is output only once. The 2 you see is length


f is just an item in columns . You should take a look at the data structure of columns .


where can I see the output twice.

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-1eaf00d-47fd6.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-1eaf00d-47fd6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?