npm.io
0.1.0 • Published 9 years ago

array-fill-with-number

Licence
MIT
Version
0.1.0
Deps
0
Vulns
0
Weekly
0
Stars
1

array-fill-with-number Build Status

Array fill with number

Install

$ yarn add array-fill-with-number

or

$ npm install --save array-fill-with-number

Usage

const arrayFillWithNumber = require('array-fill-with-number');

arrayFillWithNumber(10);
//=> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

arrayFillWithNumber(10, 1);
//=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

API

arrayFillWithNumber(lenght, [start])
length

Type: number

Length of number

start

Type: number
Default: 0

Start of number

License

MIT Jimmy Moon