DEV Community

Cover image for JavaScript Fundamentals Part 1: Basic Variables/Data Types
Anthony Beckford🚀
Anthony Beckford🚀

Posted on

JavaScript Fundamentals Part 1: Basic Variables/Data Types

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

https://developer.mozilla.org/en-US/

Top comments (0)