Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Declaring a Boolean Value | Manipulating Data
Introduction to JavaScript

bookChallenge: Declaring a Boolean Value

Task

Swipe to start coding

The given code contains a conditional expression which we have not studied yet, so you don't need to worry about understanding it right now.

The program displays:

  • The product is available. if sAvailable is true.
  • The product is out of stock. if isAvailable is false.

Your task is simple: declare a variable called isAvailable and set its value to true.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 12
single

single

Ask AI

expand

Ask AI

ChatGPT

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

close

bookChallenge: Declaring a Boolean Value

Swipe to show menu

Task

Swipe to start coding

The given code contains a conditional expression which we have not studied yet, so you don't need to worry about understanding it right now.

The program displays:

  • The product is available. if sAvailable is true.
  • The product is out of stock. if isAvailable is false.

Your task is simple: declare a variable called isAvailable and set its value to true.

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Β 2. ChapterΒ 12
single

single

some-alt