Accessing array values from list input in JS


    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]); } ----------------------------------------------------------------

    • Apr 25 2015 | 4:07 pm
      inlets = 1; outlets = 1;
      function list() { post(arguments[1]); }
      0r:
      function list() { var myArray = arguments; post(myArray[1]); }
    • Apr 26 2015 | 6:13 am
      Thanks!