mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +00:00
Apply let/const transform.
This commit is contained in:
@@ -8,7 +8,7 @@ import baseRandom from './_baseRandom.js';
|
||||
* @returns {*} Returns the random element.
|
||||
*/
|
||||
function arraySample(array) {
|
||||
var length = array.length;
|
||||
const length = array.length;
|
||||
return length ? array[baseRandom(0, length - 1)] : undefined;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user