[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/MaazWebDev/Basic-To-Advanced-JavaScript/main/Variables/app.js [Back]  [Original]

//Javascript ready made function use to pop up message on screen 

alert("Hello World");

//What are Variables ? Variables are use to store different types of data

//There are 8 types of data :

//1.String Data which is in double or single qoute (e.g "Hello",'World')
//2.Number Data which is not in double or single but in numbers (e.g 20,3000)
//3.Boolean True 0r False Value Only
//4.Null
//5.Undefined Made Variable but no value is assigned
//6.Function
//7.Array
//8.Object

// Var :

var greetings = "Hello World" //String
var noOfStudents = 20 //Number
var isClassGoingOn = true //True
var noOfStudentPass ; //Undefined

// alert(greetings);
console.log(greetings);
console.log(noOfStudents);
console.log(isClassGoingOn);
console.log(noOfStudentPass);

//Rule Of Making Variables :
// 1. Variable should not start with numbers (e.g 1stVariable)
// 2. Variable should not have space in variable name (e.g my variable)
// 3. Variable should not use any special character except dollar and underscore  (e.g my_variable)
// 4. Variable should not be on name of javascript keyword  (e.g array,loop)
// 5. Best option for variable name is to write variable name is camelcase  (e.g myVariableJs)

Web Proxy Viewer  |  New URL  |  Original Page