matchArrayLengths MethodStatic

Match the length of destination array with the length of source array

  • If destination has more elements than source, remove the extra elements.
  • If destination has fewer elements than source, use constructionFunction to create new elements.

matchArrayLengths(source: any[], dest: any[], constructionFunction: () => any): number

Parameter Type Description
source any[] the source array
dest any[] the destination array
constructionFunction () => any function to call to create new elements.

Returns - number

Defined in

Last Updated: 17 December, 2024