|
I am trying to find a List like function for Javascript, but to no avail. I need to be able to create a custom list like List. I know you can do it in C# but I need it in Javascript. Hopefully there is something similar. Thanks
(comments are locked)
|
|
I think you are looking for this...? Greetz, Ky. uh, Unity (or Mono) adds features like those collections to JS? That is crazy, actually
Sep 13 '11 at 11:51 AM
japanitrat
I take that as crazy-in-a-good-way? ^^
Sep 13 '11 at 11:59 AM
SisterKy
indeed ;) but i wonder where this is documented (except for the collections)
Sep 13 '11 at 12:13 PM
japanitrat
(comments are locked)
|
|
If you are speaking of C# then "List" is not a function but a collection. In JS you can use Array which serves the same purpose (for instance you can push and pop elements dynamically), although it does provide the same amount possibilities. Array is not really what I need. I need something that do the equivalence of
Sep 12 '11 at 09:46 PM
BrandonLayton
JavaScript has no generics, so the answer is no. But you can put all kinda things into a JS Array, its just not type-safe. Edit: as pointed out by Ky, Unity or Mono do enhance the common JS stuff.
Sep 13 '11 at 09:22 AM
japanitrat
(comments are locked)
|
