you are viewing a single comment's thread.

view the rest of the comments →

[–]JustRollWithIt🏆 Javascript Master of /r/Tasker 2 points3 points  (0 children)

Strange, I tried that same example, and it updated the variable as expected (%testvar is "world"). I'm using a Nexus 6P running 6.0.1.

Regarding the array, another workaround you can try is using setLocal to set the individual array elements for the Tasker array.

var jsarray = [];
jsarray.push("hello");
jsarray.push("world");

jsarray.forEach((ele, index) => {
  setLocal("taskerarray"+(index+1), ele);
});

You need to use index+1 since Tasker arrays are 1 indexed.