samedi 26 août 2017

How to generate 1-10 3 times by lodash one line

I try to use this expression to do it.

_.times(3, _.random(1, 10))

but return this:

[undefined, undefined, undefined]

my expect result like this:

[3, 7, 5]




Aucun commentaire:

Enregistrer un commentaire