Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Accessing Control System | Conditional Statements
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Introduction to JavaScript

bookChallenge: Accessing Control System

Task

Swipe to start coding

You are building a simple access control system for a building. Two boolean variables are already defined:

  • hasAccessCard β†’ indicates an employee.
  • hasSpecialPass β†’ indicates a visitor pass.

Your task is to write an if statement that checks if at least one of these conditions is true.

  • If access is allowed, display: Access granted.
  • Otherwise, display: Access denied.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 14
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

close

bookChallenge: Accessing Control System

Swipe to show menu

Task

Swipe to start coding

You are building a simple access control system for a building. Two boolean variables are already defined:

  • hasAccessCard β†’ indicates an employee.
  • hasSpecialPass β†’ indicates a visitor pass.

Your task is to write an if statement that checks if at least one of these conditions is true.

  • If access is allowed, display: Access granted.
  • Otherwise, display: Access denied.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 14
single

single

some-alt