Skip to content

Instantly share code, notes, and snippets.

@ElectricImpSampleCode
Last active November 26, 2019 14:53
Show Gist options
  • Save ElectricImpSampleCode/23a9a81c5ae3a1929996 to your computer and use it in GitHub Desktop.
Save ElectricImpSampleCode/23a9a81c5ae3a1929996 to your computer and use it in GitHub Desktop.
Squirrel array map() example
local anArray = [true, true, false, false, true];
// Apply the data conversion function and save the result in a new array
local newArray = anArray.map(function(value) {
return !value;
});
// newArray equals [false, false, true, true, false]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment