Home > front end >  How do I understand this period of paging code
How do I understand this period of paging code

Time:03-21


Pages () {
Const pages=[]
Enclosing a list. The forEach ((item, index)=& gt; {
Const page=Math. Floor (index/8)
if(! Pages [page]) {
Pages=[page] []
}
Pages [page] push (item)
})
Return pages
}

See for a long time all can't understand, to print several times, it felt like before 8 times 0, is false invert, such as
  • Related