View Single Post
06/14/20, 12:14 PM   #3
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
Originally Posted by Shinni View Post
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.
  Reply With Quote