-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtempName.html
More file actions
83 lines (60 loc) · 1.77 KB
/
tempName.html
File metadata and controls
83 lines (60 loc) · 1.77 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<html>
<head>
<title>JS tut 4</title>
</head>
<body>
<h3>JS Tut 4</h3>
<script language="javascript" type="text/javascript">
document.write(">> Start <br />");
function multiDimArr()
{
var multiDim = [ [1,2,3] , [4,5,6] ];
for (var i=0 ; i< multiDim.length ; i++)
{
for(var j=0; j<multiDim[i].length ; j++)
{
document.write(multiDim[i][j] + " " );
}
document.write("<br />");
}
}
function addMany(num1, num2)
{
var i=1;
var sum=1;
document.write("Arguments length : " + arguments.length + "<br />");
while(i < arguments.length)
{
sum = sum + arguments[i];
i++;
}
document.write("Sum of arguments : " + sum + "<br />");
}
var scopeTest = 1;
function scope1()
{
document.write("In scope1 : " + scopeTest + "<br />");
var scopeTest = 5 ;
document.write("In scope1 : " + scopeTest + "<br />");
return true;
}
function scope2()
{
var hue = "aha";
document.write("In scope2 : " + hue + "<br />");
}
document.write(">> " + scopeTest + "</br>");
</script>
<p> ------------------ <p>
<script language="javascript" type="text/javascript">
//arr = generateArray1();
//printArrFunc(arr);
//arraySplicing();
//multiDimArr();
//addMany(2,3,4);
scope1();
scope2();
document.write(">>");
</script>
</body>
</html>