pic rel,
trying to make a hidden link button to my site displasy if the user is older than 18.
is something wrong with my code?
>>18491409
yeah you dont have the case where age = 18
>>18491455
Explain
>>18491472
you only check if age is < or > 18. So if age is set to 18, none of the conditionals are true.
You should just make the check (age >= 18)
>>18491492
Did
>>18491492
How is it set?
Can value be blank?
>>18491508
Oh, it won't run as shown.
your if statement has messed up scope curly braces.
you need an '{' after your first if and another '}' before the </script>
also, I think JS will take an empty value as '0' but I don't use js much
>>18491518
Rite