How do I turn a JS array into a Snap! list (using JS)?

Pretty simple, how do I do that?

You don't need to. Just make it return as a string, then...
untitled script pic
(where [1, 2, [3, 4], 5] is your new data)
Or make it return as a List() object.

as in, List(array)?

I believe so. I'm not entirely sure how to use the List object.

me niether, i tried that but it returned nothing
edit: ohh i see i need to do new List(array)
edit 2: it works!
untitled script pic (11)

i'd like to return it as a list, and i'm editing the source so i can't use the block

Looking at the source, I found this:

function List(array) {
    this.type = null; // for UI lists, such as costumes, sounds, sprites
    this.contents = array || [];
    this.first = null; = null;
    this.isLinked = false;
    this.lastChanged =;

which means that you would have to make new List(null, [contents]), I believe.

i just found the solution, yes that is correct (minus the null part)