3 ms·
At least its not lua. My personal wtf was with lua ignoring variable scope.. its just a hashtable it all goes into it - https://onecompiler.com/lua/3zjsw5up3 h
by PicassoCTs 3y ago
At least its not lua.
My personal wtf was with lua ignoring variable scope.. its just a hashtable it all goes into it - https://onecompiler.com/lua/3zjsw5up3 https://onecompiler.com/lua/3zjsw5up3
- synergy20 3y agowhere does it ignore the scope? use 'local' it stays in the function scope, without 'local' it's global, other scripting languages(e.g. bash) does the same.
- spacechild1 3y agoI'm not sure what your code example is supposed to demonstrate... All I can say is that Lua uses lexical scoping for local variables (which need to be declared as "local").