-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
44 lines (38 loc) · 832 Bytes
/
script.js
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
var i = 0;
while (i < 3) {
alert(i);
i++;
}
function makeMessage(part1, part2) {
var message = part1 + part2;
return message;
}
var firstName = "Abraham ";
var lastName = "Lincoln";
alert(makeMessage(firstName, lastName));
var a = ["1", "2"];
var b = ["5", "6"];
var emptyArr = [];
var c = 0;
for (var aa = 0; aa < a.length; aa++) {
for (var bb = 0; bb < b.length; bb++) {
emptyArr[c] = a[aa] + b[bb];
c++;
}
}
for (var cc = 0; cc < emptyArr.length; cc++) {
alert(emptyArr[cc])
}
var a = new Date();
var b = a.getDay();
var dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
alert(dayNames[b]);
var a = new Date();
var hrs = a.getHours();
a.setHours(hrs+1);
alert(a);
function namPlz() {
var a = prompt("Enter name");
alert(a);
}
namPlz();