Accessing array values from list input in JS
elephants gerald
Apr 25 2015 | 3:39 pm
I'm trying to access list elements using the js object.
I can operate on the entire list, but not on individual elements. I'm guessing there's a difference between max "lists" and js arrays that I'm missing...
Could someone explain to me why this doesn't work? This is a very basic task in browser-based js. Thanks!
------------------------------------------------------------------------
I pass the js object this message through inlet 1: 5 4 3 2 1
------------------------------------------------------------------------
//This should print 4... but prints
inlets = 1;
outlets = 1;
function list(input) {
var myArray = input;
post(myArray[1]);
}
----------------------------------------------------------------