Course Content
Introduction to JavaScript (staging)
Introduction to JavaScript (staging)
Boolean Naming Convention
Boolean naming convention
Boolean, in programming, is a data type that is either true
or false
. Prefixes like is
, has
, and are
added in the booleans to distinguish them from other variables. Boolean data-type has two values true
or false
.
Note We will discuss booleans in more detail in the upcoming chapters.
// Not clear that the identifier is a boolean let clear = true; console.log(clear); // clear that the identifier is a boolean let isClear = true; console.log(isClear);
Task
Declare a boolean variable with an identifier Raining
. Use the prefix is
with the above boolean variable and store the false
value in it. Display the value of the variable in the end.
Thanks for your feedback!
Boolean Naming Convention
Boolean naming convention
Boolean, in programming, is a data type that is either true
or false
. Prefixes like is
, has
, and are
added in the booleans to distinguish them from other variables. Boolean data-type has two values true
or false
.
Note We will discuss booleans in more detail in the upcoming chapters.
// Not clear that the identifier is a boolean let clear = true; console.log(clear); // clear that the identifier is a boolean let isClear = true; console.log(isClear);
Task
Declare a boolean variable with an identifier Raining
. Use the prefix is
with the above boolean variable and store the false
value in it. Display the value of the variable in the end.
Thanks for your feedback!
Boolean Naming Convention
Boolean naming convention
Boolean, in programming, is a data type that is either true
or false
. Prefixes like is
, has
, and are
added in the booleans to distinguish them from other variables. Boolean data-type has two values true
or false
.
Note We will discuss booleans in more detail in the upcoming chapters.
// Not clear that the identifier is a boolean let clear = true; console.log(clear); // clear that the identifier is a boolean let isClear = true; console.log(isClear);
Task
Declare a boolean variable with an identifier Raining
. Use the prefix is
with the above boolean variable and store the false
value in it. Display the value of the variable in the end.
Thanks for your feedback!
Boolean naming convention
Boolean, in programming, is a data type that is either true
or false
. Prefixes like is
, has
, and are
added in the booleans to distinguish them from other variables. Boolean data-type has two values true
or false
.
Note We will discuss booleans in more detail in the upcoming chapters.
// Not clear that the identifier is a boolean let clear = true; console.log(clear); // clear that the identifier is a boolean let isClear = true; console.log(isClear);
Task
Declare a boolean variable with an identifier Raining
. Use the prefix is
with the above boolean variable and store the false
value in it. Display the value of the variable in the end.