function endsWith(source, suffix) {
  for (
    let srci = source.length - 1, sfxi = suffix.length - 1;
    sfxi >= 0;
    srci--, sfxi--
  ) {
    if (source[srci] !== suffix[sfxi]) return false;
  }
  return true;
}
/** Check whether binary array ends with suffix.
 * @param source source array
 * @param suffix suffix array to check in source
 */
Check whether binary array ends with suffix.
@param source source array
@param suffix suffix array to check in source
Check whether binary array ends with suffix . @param source source array @param suffix suffix array to check in source
function endsWith(source, suffix) {
  for (
    let srci = source.length - 1, sfxi = suffix.length - 1;
    sfxi >= 0;
    srci--, sfxi--
  ) {
    if (source[srci] !== suffix[sfxi]) return false;
  }
  return true;
}
function endsWith ( source , suffix ) { for ( let srci = source . length - 1 , sfxi = suffix . length - 1 ; sfxi >= 0 ; srci -- , sfxi -- ) { if ( source [ srci ] !== suffix [ sfxi ] ) return false ; } return true ; }
Check whether binary array ends with suffix.
Check whether binary array ends with suffix .