Originally Posted by Shinni
I suppose "function() BarTracker.toggleVisibility(true) end" might be the same as your JavaScript example? Is "(() => BarTracker.toggleVisibility(true))" a function?
|
There is no equivalent to lambda functions in Lua, so the most direct comparison would simply be an anonymous function in js:
Code:
RegisterSomething(function() {
DoSomething(true);
});
You may think they do the same, but as with many things in JS there are fine and easily overlooked differences that will make your life as a developer a living hell if you don't know about them.