Created
September 10, 2019 18:49
-
-
Save W3BGUY/00902f9d8a228f7299e7a2d1c494f109 to your computer and use it in GitHub Desktop.
On liner that can be used to remove duplicates from an array. Great for use in NetSuite scripts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var newArray=oldArray.reduce(function(a,b){if(a.indexOf(b)<0)a.push(b);return a;},[]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you