Hiding a page programmatically using Velo/JS

Here is an example. A user logs in to the system for the first time or is a non-member. I want to show them a menu that does not contain the members only pages in the dropdown by using Velo to HIDE the pages, so they don’t show in the dropdown menu. Later on, based on their login/registration, then the pages will be revealed/unhidden.
Is this programmatically possible? If so, can someone direct me to a code example?
Thanks for the feedback in advance.