Last active
February 28, 2016 08:17
-
-
Save andevsoftware/cea78dd663e5e014399a to your computer and use it in GitHub Desktop.
TSCore\Data\Collection - transform method
This file contains hidden or 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 collection = new TSCore.Data.Collection<number>([1, 2, 3, 4, 5]); | |
| collection.transform((item: number, key: number) => { | |
| return item * 2; | |
| }); | |
| collection.toArray(); | |
| // [2, 4, 6, 8, 10] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment