Skip to content
Sign upLog in
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
2

How to solve this?

rudy35hernandez
rudy35hernandez

I am stumped on this question. I re-read the entire lesson plan and I am still unable to solve this. Any ideas?

function lottoTicket(age) {
const valid = "Thanks for your purchase!"
const invalid = "Purchase denied. Try again when you're older."
if(age > 18) {
return(valid)
}
else {
return(invalid)
}
}

ageAlice = 12

ageBob = 20

// declare a variable to save Alice's lottoTicket autoresponse and another to save Bob's lottoTicket autoresponse

2 years ago
You are viewing a single comment. View All
1