Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/firebase/quickstart-js
/ getRandomItem
Function
getRandomItem
firestore/scripts/PopulateFirestore.js:139–141 ·
view source on GitHub ↗
(arr)
Source
from the content-addressed store, hash-verified
137
};
138
139
const
getRandomItem = (arr) => {
140
return
arr[Math.floor(Math.random() * arr.length)];
141
};
142
143
/**
144
*
Callers
1
generateMockRestaurants
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected