This API is provided to add combined two arrays together, by elementusing an arithmetic operation. Each array element is combined separately.
Parameters
- Operation (string) - "ADD", "SUB", "DIV", or "MUL" and "MULT"
- Array
- Array
Return Value
This function will return a A JavaScript array.
Example
Code Block | ||
---|---|---|
| ||
var numbersA = [1, 2, 3, 4]; var numbersB = [9, 8, 7, 6]; var result = pjs.arrayOp('"ADD'", numbersA, numbersB); // result =is [10, 10, 10, 10] |