Skip to content

Commit 93a5492

Browse files
committed
JAVASCRIPT Refresher
0 parents  commit 93a5492

38 files changed

+615
-0
lines changed

27.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>JS Strings</title>
5+
</head>
6+
<body>
7+
<h2>Javascript Numbers</h2>
8+
<p>Numbers can be written in JS without or with decimals</p>
9+
<p id="demo"></p>
10+
<script>
11+
let x1 = 10.4;
12+
let x2 = 10.00;
13+
let x3 = 3.14;
14+
document.getElementById('demo').innerHTML =
15+
x1 + '<br>' + x2 +'<br>' + x3 ;
16+
</script>
17+
</body>
18+
</html>

28.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>
5+
JavaScript Arrays
6+
</title>
7+
8+
</head>
9+
<body>
10+
<h2>What can JS do?</h2>
11+
<p>JS arrays indexes are zero based meaning the first item is [0]</p>
12+
<p id="demo"></p>
13+
<script>
14+
const Coachings = ['Allen','Resonance','Bansal'];
15+
document.getElementById('demo').innerHTML =Coachings[0];
16+
</script>
17+
</body>
18+
</html>

29.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>JS OBJECTS</title>
5+
</head>
6+
<body>
7+
<h2>We are going to create an object</h2>
8+
<p id="demo"></p>
9+
<script>
10+
const person =
11+
{
12+
FirstName :'Robin',
13+
LastName :'Jha',
14+
Age : 26,
15+
fullname: function() {
16+
return this.FirstName + " " + this.LastName;
17+
}
18+
19+
};
20+
document.getElementById('demo').innerHTML =
21+
person.FirstName + ' ' + person.LastName ;
22+
</script>
23+
</body>
24+
</html>

30.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>JavaScript Operators</title>
5+
</head>
6+
<body>
7+
8+
<h2>The typeof operator returns the type of variable or an expression. </h2>
9+
<p id="demo"></p>
10+
<script>
11+
document.getElementById('demo').innerHTML =
12+
typeof "" + '<br>' +
13+
typeof "Lala" + '<br>' +
14+
typeof 23;
15+
</script>
16+
</body>
17+
18+
</html>

31.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Javascript</title>
5+
</head>
6+
<body>
7+
<h2>What can JS do?</h2>
8+
<p>JS evaluates expressions from left to right</p>
9+
<p id="demo"></p>
10+
<p id="demo1"></p>
11+
12+
<script>
13+
let x = "volvo" + 2 +3
14+
document.getElementById('demo').innerHTML = x;
15+
let y = 2 + 3 + "volvo"
16+
document.getElementById('demo1').innerHTML = y;
17+
18+
</script>
19+
</body>
20+
</html>

32.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>JavaScript</title>
5+
</head>
6+
<body>
7+
<h2>What can JS do ?</h2>
8+
<p>The value (and data type) of a vriable with no value is <b>undefined</b>.</p>
9+
<p id="demo"></p>
10+
<script>
11+
let wassup;
12+
document.getElementById('demo').innerHTML =
13+
typeof wassup + '<br>' + typeof 'lala' ;
14+
</script>
15+
16+
17+
</body>
18+
</html>

33.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>JavaScript</title>
5+
</head>
6+
<body>
7+
<h2>What can JS do?</h2>
8+
<p id='demo'></p>
9+
<script>
10+
const car = {type:"Fiat", Model:"500"};
11+
document.getElementById('demo').innerHTML = "The car type is " + car.type
12+
13+
</script>
14+
</body>
15+
</html>

34.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Javascript Objects</title>
5+
</head>
6+
<body>
7+
<h2>what can js do?</h2>
8+
<p id="demo"></p>
9+
<script>
10+
const person = {firstname : 'Mona', Lastname : 'singh',Age : 22};
11+
document.getElementById('demo').innerHTML = "Hi my name is " +person.firstname +' '+ person.Lastname +" and my age is "+ person.Age;
12+
13+
</script>
14+
</body>
15+
</html>

35.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>JS </title>
5+
</head>
6+
<body>
7+
<h2>What can JS do?</h2>
8+
<p id="demo"></p>
9+
<script>
10+
const person = {
11+
fname: 'Maya',
12+
lname:'ji',
13+
fullName : function() {
14+
return this.fname + " " + this.lname;
15+
}
16+
17+
};
18+
document.getElementById('demo').innerHTML = person.fullName()
19+
20+
</script>
21+
<!-- <script>
22+
var person = {
23+
fname: 'Maya',
24+
lname: 'ji',
25+
fullName: function() {
26+
return this.fname + " " + this.lname;
27+
}
28+
};
29+
30+
document.getElementById('demo').innerHTML = person.fullName();
31+
</script>-->
32+
</body>
33+
</html>

FIRST.HTML

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<html>
2+
<body>
3+
<h2>My First Javascript</h2>
4+
<button type="button" onclick="document.getElementById('demo').innerHTML = Date()">Click me to display Date and Time</button>
5+
<p id="demo"></p>
6+
</body>
7+
</html>

0 commit comments

Comments
 (0)