-
Today’s After Effects Modern Javascript Expression is the Spread Operator
Today’s After Effects Modern Javascript Expression is the Spread Operator.
The Spread Operator provides a shorthand way to write out an array. It’s also easily readable and works well for find the Minimum or Maximum values in an Array.
// Start of Expression
const tableValues = [250,500,200];// Use spread to pass the elements of sliderValues as individual arguments
const minValue = Math.min(…tableValues);
minValue;// End of Expression
// Start of Expression
const firstArray = [1, 2, 3];
const secondArray = [4, 5, 6];const combinedArray = […firstArray, …secondArray];
combinedArray;// End of Expression
Sorry, there were no replies found.