How to get the js variable name. For example, var item1; gets the variable name I instead of the variable value 1.

how to get the js variable name. For example, var item1; gets the variable name I instead of the variable value 1.

Oct.24,2021

for(var k in window) {
    if(window[k] == 1) {
        console.log(':'+ k);
    }
}

then try this

let timerObj = new Map()
for (let i =0 ;i < 5; iPP) {
  timerObj.set(`timer_${i}`, ()=>{console.log('')}) 
}
for(let param of timerObj) {
     console.log(param)
}
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-1b382ab-2b456.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-1b382ab-2b456.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?