function alternating(length) {
  const result = new Array(length);
  for (let i = 0; i < length; i++) {
    result[i] = 0x55;
  }
  return result;
}
Returns a ByteArray with alternating 0 and 1 bits set.

@param {number} length
@return {!e2e.ByteArray}