Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Task - Declare a Boolean Value | Manipulating Data
Introduction to JavaScript
course content

Contenu du cours

Introduction to JavaScript

Introduction to JavaScript

1. Getting Started
2. Manipulating Data
3. Conditional Statements

book
Task - Declare a Boolean Value

Tâche

Swipe to start coding

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

The code represents a program which displays "The product is available" if the variable isAvailable is true, otherwise it displays "The product is out of stock.".

Your task is:

  • Declare a new variable called isAvailable which is set to true;

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 12
toggle bottom row

book
Task - Declare a Boolean Value

Tâche

Swipe to start coding

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

The code represents a program which displays "The product is available" if the variable isAvailable is true, otherwise it displays "The product is out of stock.".

Your task is:

  • Declare a new variable called isAvailable which is set to true;

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 12
Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Nous sommes désolés de vous informer que quelque chose s'est mal passé. Qu'est-il arrivé ?
some-alt