Skip to content

JavaScript library to generate new array of a given size with optional custom value

Notifications You must be signed in to change notification settings

Ovi/generate-new-array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Npm package version

generate-new-array

JavaScript library to generate new array of a given size with optional custom value

const array = require('generate-new-array');

array(5);
// > [ 0, 1, 2, 3, 4 ]

array(2, 'Hi');
// > [ 'Hi', 'Hi' ]

array();
// > []

License

MIT

About

JavaScript library to generate new array of a given size with optional custom value

Topics

Resources

Stars

Watchers

Forks