How to get the original name of loop variables in JavaScript?

In the following example code, the function "getOriginalName" does not exist, but that is what I am looking for: for(let variable of [var1, var2, var3]) { console.log("Value: " + variable); console.log("Name: " + getOriginalName(variable)); } In my dreams, getOriginalName would return "var1", "var2" and "var3". I know that you can access the name of variable… Read More How to get the original name of loop variables in JavaScript?

is it safe to use the same variable name repeatedly in a series of functions?

Is it safe to re-use the same variable name repeatedly in a series of functions? My code is: with open(thisdoc_dir + ‘/’ + ‘metadata.txt’, ‘w’) as m: m.write(str(metadatas[1]) + ‘\n’) m.close() with open(thisdoc_dir + ‘/’ + ‘metadata.json’, ‘w’) as m: m.write(str(metadatas[0])) m.close() with open(thisdoc_dir + ‘toc.txt’, ‘w’) as m: m.write(str(metadatas[2])) m.close() Before this block, I… Read More is it safe to use the same variable name repeatedly in a series of functions?