I'm trying to make a fast javascript version of the sort block, but I cannot get a list to input correctly. I've never really used javascript before, so any help is appreciated.
My block works when I define the variable in the block, like this:
But it does not work if I try to use a list as an input, like this:
or like this:
Thanks in advance!