Quartz Composer JavaScript Reference © Cybero Designs  

splice

Type Method
Format Extract elements = array object. Splice (position, length, string replacement)
Commentary
Splice the split location for the specified range or an array element. The return value is the element of the range specified in the original sequence and the remaining element.If the replacement string is specified, the replacement string is inserted after the position or range specified in the original sequence. Replacement string can be listed separated by commas.
Sample code - QC 2 JavaScript
a = new Array (12,34, "AB", "CD", "EF");
b = a.splice (1,2, "ZZ");
outputs [0] = a.toString () + String.fromCharCode (10) + b.toString ();
Sample code - QC 3 JavaScript
var myArrayB = new Array(12,34,"AB","CD","EF");
var b = myArrayB.splice(1,2,"ZZ");
var outputArray = new Array();
var n = myArrayB.toString()+String.fromCharCode(10)+b.toString();
function (__string outputArray) main ()
{ var result = new Object();
result.outputArray = n.toString();
return result; }


Return to the Start Page