The problem of variables in for Loop in promise,then and catch

define a variable redBorderIndex=1, calls the method of promise type with for loop, execute the then variable PP, when executing catch, print the variable, but the print variable does increase when then is executed, and the variable is still 1 when catch is executed. The specific code is as follows:

Mar.16,2021

is it possible that the promise returned first made a mistake, so you went catch , at this time redBorderIndex or 1 , and then promise did not report wrong, so if you go redBorderIndexPP , you can add a debugger to both then and catch .

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