Quartz Composer JavaScript Reference © Cybero Designs  

unshift

Type Method
FormatObject array . Unshift (,..., elements add additional elements)
Commentary
Adds one or more elements to the beginning of an array and returns the new length of the array.
Sample code - QC 2 JavaScript
myAry1 = new Array (12,34, "AB", "CD");
myAry1.unshift ( "XYZ");
outputs [0] = myAry1.toString ();
Sample code - QC 3 JavaScript
var myArrayB = new Array(12,34,"AB","CD");
var outputArray = new Array();
var n = myArrayB.unshift("XYZ");
function (__string outputArray) main ()
{ var result = new Object();
result.outputArray = myArrayB.toString();
return result; }


Return to the Start Page