DEV Community

Code_Regina
Code_Regina

Posted on

|JavaScript| JavaScript: Basics

The focus of this post was to include new information from Colt Steele Web Developer Bootcamp Updated Version.

HTML: The Essentials

          -Primitives and The Console 
          -JavaScript Numbers
          -What is NaN
          -Variables and Let
          -Booleans
Enter fullscreen mode Exit fullscreen mode

Primitives and The Console

Primitive Types are the basic building blocks of JavaScript.

         -Number 
         -String
         -Boolean
         -Null 
         -Undefined 
Enter fullscreen mode Exit fullscreen mode

These are the different types of information that can be stored with JavaScript primitives.

JavaScript Numbers

JavaScript has one number type
Positive numbers
Negative numbers
Whole numbers (integers)
Decimal numbers

What is NaN

NaN is Not a number
Nan is a numeric value that represents something that is...not a number.
May represent a value that is not a number, such as a typeof.

Variables and Let

Variables are like labels for values
We can store a value and give it a name so that we can refer back to it later, use that value to do something or change it later.

Booleans

Booleans are used to store yes or no / truth and false values.


let isLoggedIn = true; 

let gameOver = false; 

const isWaterWet = true; 

Enter fullscreen mode Exit fullscreen mode

Booleans are very simple, there are only two possible options either true or false. That's it.

Top comments (1)

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

This isn't correct. JavaScript has two numerical types: Number and BigInt. You also missed Symbol from the list of primitive types