MCPcopy Index your code
hub / github.com/CodeWithHarry/Sigma-Web-Dev-Course / getRandom

Function getRandom

Video 99/main.js:11–14  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

9app.set('view engine', 'ejs');
10
11const getRandom = (arr)=>{
12 let rno = Math.floor(Math.random() * (arr.length - 1))
13 return arr[rno]
14}
15
16
17app.get('/', (req, res) => {

Callers 1

main.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected