scrimba
Note at 3:50
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Note at 3:50
AboutCommentsNotes
Note at 3:50
Expand for more info
shortChangeTests.js
run
preview
console
export function roll(min, max, floatFlag) {
let r = Math.random() * (max - min) + min
return floatFlag ? r : Math.floor(r)
}

export let testPurses = Array(5).fill(0).map(a => {
return {
oneRupee: roll(0, 15),
twoRupee: roll(0, 10),
fiveRupee: roll(0, 5),
tenRupee: roll(0, 5),
price: Number(roll(0,100, 1).toFixed(0))
}
})
Console
/index.html
LIVE