Table of Contents
Back Button
Back to Chapter
Control Statements
No items found.
Function & Events
No items found.
Array and its Types
No items found.
OOP : Object Oriented Programming
No items found.
Javascript Standards
No items found.
No items found.
Javascript : Advanced 1
No items found.
Javascript : Advanced 2
No items found.
Additional JavaScript
No items found.

JavaScript Types of Value

As in Mathematics, you need 2 type of Values i.e. Constant and Variables. to do Operations

Same as in Javascript, you have to use 2 type of Values :

  1. Constant or Fixed Number these are called as Literals
  2. Variables.

Javascript Literals

There can be 2 Types of Values that can be termed as Literals.

  1. Numbers :
  2. Any Numeric Number can be considered as Literals.
  3. Example : 10, 20.5, 500 , 999.79
  4. Strings :
  5. Strings are Same as Text.
  6. Example : "Javascript" , "World of Programming".

To Write a String, you have to write it within double or single quotes.

Javascript Variables

Same as in Mathematics, Variables are used here to Store values.

In Javascript to Declare a Variable, you have to use a Keyword  var .To Store Values in Variables  equal sign (=)  is used.

For Example :

var x;

var y;

var z;


10 is stored in x, 20.5 is stored in y and 999.79 is stored in z.

In Variables, you can store All Literals(numbers and string)

For Example :

var x;

var y;
y = "Hello World"

Here, the Literal  "Hello World"  is stored in variable y.

In Later Section, We will got deep into Variables.

Ask queries
Contact Us on Whatsapp
Hi, How Can We Help You?