function zeroTo( n ) {
	var dtype;
	if ( !isNonNegativeInteger( n ) ) {
		throw new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', n ) );
	}
	if ( arguments.length > 1 ) {
		dtype = arguments[ 1 ];
		if ( dtype === 'generic' ) {
			return base( n );
		}
	} else {
		dtype = DEFAULT_DTYPE;
	}
	return base.assign( zeros( n, dtype ), 1, 0 ); // defer dtype validation to `zeros`
}
Generates a linearly spaced numeric array whose elements increment by 1 starting from zero.

@param {NonNegativeInteger} n - number of elements
@param {string} [dtype="float64"] - data type
@throws {TypeError} first argument must be a nonnegative integer
@throws {TypeError} second argument must be a recognized data type
@returns {(TypedArray|Array|ComplexArray)} array or typed array

@example
var arr = zeroTo( 2 );
// returns <Float64Array>[ 0.0, 1.0 ]

@example
var arr = zeroTo( 2, 'float32' );
// returns <Float32Array>[ 0.0, 1.0 ]