Boolean operators, exercise: find the adults. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Boolean operators, exercise: find the adults.

Hi, im having troubles with this exercise I don’t know what’s wrong with my code, it pass 3 of the 5 tests for itself but I don’t know why it doesn’t pass all tests. function main() { var age = parseInt(readLine(), 10) // Your code here var age = 21; var olderEnough = 18; var validate = (age >= olderEnough); console.log (validate) } Can someone help me please!! :(

19th Dec 2021, 12:07 AM
Juan carlos Sepulveda
3 Answers
+ 3
You probably shouldn't overwrite the input in the age variable.
19th Dec 2021, 12:24 AM
Simon Sauter
Simon Sauter - avatar
+ 2
I fixed that but isn’t works anyway x(
19th Dec 2021, 12:29 AM
Juan carlos Sepulveda
0
So update your code in the question
19th Dec 2021, 2:14 AM
Emerson Prado
Emerson Prado - avatar