-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
36 lines (28 loc) · 1.17 KB
/
app.js
File metadata and controls
36 lines (28 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//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)