DEV Community

Discussion on: Daily Challenge #140 - I love you, a little, a lot, passionately ... not at all

Collapse
 
vctr1005 profile image
Victor Lazo Dominguez

JS a little bit traditional. I used the array created by SavagePixie. Thanks

const responses = [
"not at all",
"I love you",
"a little",
"a lot",
"passionately",
"madly",
]

const loveLevel = function(n){
const rand = Math.floor((Math.random() * n) % 6)
return responses[rand]
}