Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Boolean 1/4 | Data Types and Variables
Introduction to JavaScript

book
Boolean 1/4

What are Booleans Values

The boolean data type is either true or false. In programming, we often need to know if an expression (code snippet which evaluates to some value) is true or false so in that case, we use boolean values. In JavaScript, boolean variables are defined by the true and false keywords.

let isClear = true;
console.log(isClear);
12
let isClear = true; console.log(isClear);
copy
Tâche

Swipe to start coding

Declare a variable isEarthFlat and assign the value false to it. Display the value on the console.

Solution

let isEarthFlat = false;
console.log(isEarthFlat);

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 3. Chapitre 15

Demandez à l'IA

expand
ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

some-alt