Basic

Conditional Message Display

In this challenge, you'll implement the logic to toggle a user's login status. You will be given a user interface with two messages: one welcoming authenticated users and another inviting users to sign in or register. Your task is to ensure that clicking a button dynamically changes the authentication state and only displays the appropriate message based on the current status.


Objectives

  • Display only the message that corresponds to the authentication state.
  • Toggle the authentication state when clicking the button.
Gallery