newList( item... )

Returns a new modifiable list, initialized with the specified items.

The implementation used for the list is chosen by the compiler, there is no guarantees on which will be used, just that it will be modifiable. If you require a specific implementation you can use one of the more specific list constructors, e.g. newArrayList or newLinkedList.

A simple example is always useful, e.g. to construct a new list with a variety of items:

:-) newList( 1,2,3,4, "hello", <xml /> );
There is 1 result
[1, 2, 3, 4, hello, <xml />]
      

and another example showing the list is indeed modifiable:

:-) var aList = newList( 1,2,3,4, "hello", <xml /> );
:-) aList[ 3 ] := "changed";
There are 0 results
:-) aList;
There is 1 result
[1, 2, changed, 4, hello, <xml />]
      

Notes

If you know that you will never need to modify the list, use newLiteList instead.