Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

API Overview

The array..cat() API concatenates arrays and/or individual values into a new array.

Parameters

  • array or value - An array or single value to concatenate to the array. Multiple array/value parameters can be passed.

Return Value

A new array.

Examples

Title of Example Code
pjs.define("a", { type: 'integer', dim: 3 });
pjs.define("b", { type: 'integer', dim: 3 });
pjs.define("c", { type: 'integer', dim: 9 });
 
a = [1, 2, 3];
b = [4, 5, 6];
c = a.cat(b, 7, 8, 9);
// c now contains [1, 2, 4, 5, 6, 7, 8, 9]
  • No labels