How to determine whether the end-user is old enough

September 9, 2021

Use the years since operator to determine the end-user's age, then expand the expression to evaluate whether that age is greater than or equal to a certain threshold, like this:

This expression creates a boolean-type variable (user is able to vote). This variable is True or False depending on whether the logical conditional is met (i.e. the end-user is greater than or equal to 18 years old).

Hire an Afterpattern expert

Go from idea to launch in weeks.

View services