nulls

Create a "generic" array filled with null values.

Usage

var nulls = require( '@stdlib/array/base/nulls' );

nulls( len )

Returns a "generic" array filled with null values.

var out = nulls( 3 );
// returns [ null, null, null ]

Examples

var nulls = require( '@stdlib/array/base/nulls' );

// Create a null value array:
var arr = nulls( 10 );

console.log( arr );
// => [ null, null, null, null, null, null, null, null, null, null ]
Did you find this page helpful?