FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Basic-To-Advanced-JavaScript/Variables/app.js at main · MaazWebDev/Basic-To-Advanced-JavaScript · GitHub
MaazWebDev
/
Basic-To-Advanced-JavaScript
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Basic-To-Advanced-JavaScript
/
Variables
/
app.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
36 lines (28 loc) · 1.17 KB
Breadcrumbs
Basic-To-Advanced-JavaScript
/
Variables
/
app.js
Copy path
File metadata and controls
36 lines (28 loc) · 1.17 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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)
Back
|
FazBrowse Home
|
New Git URL