JavaScript Fundamentals Part 1: Basic Variables/Data Types
Anthony Beckford🚀
Posted on September 6, 2021
I'm finally onto learning JavaScript, the language of the web.
This blog is all about my learning journey of learning the fundamentals of JavaScript. I will start with the basic variables
Basic Hello World in JavaScript:
Console.log('Hello World')
What are variables?
Variables in the programming world is a place where you can store information
How to create a variable?
When defining a new variable in JavaScript it must start with the (let) keyword.let favoriteNumber = 14;
console.log(favoriteNumber); // 14
DATA TYPES IN JAVASCRIPT:
- String
- Number
- Boolean
- Symbol
- Null
- Undefined
String
- Text that can be encapsulated in either single or double quotes example: "I love learning JavaScript" 'I love football season'
Number
- Represent numeric data (positive, negative, whole, decimal) example: 5, 2.4, 8.00
Boolean
- Information that is represented as true or false example: true or false
Symbol
- A value that is not equal to any other value. example: let sym1 = Symbol();
Null
- represents the intentional absence of any object value example: const relationshpStatus = null;
Undefined
- represents a variable that is not assigned a value example: const noValue;
If you are looking for an amazing resource to learn JavaScript, MDN has amazing documentation
Posted on September 6, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.