-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
89 lines (71 loc) · 1.88 KB
/
index.html
File metadata and controls
89 lines (71 loc) · 1.88 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
84
85
86
87
88
89
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
p:nth-child(odd) {
background: red;
}
p:nth-child(even) {
background: blue;
}
</style>
</head>
<body>
<script>
/* var a = 2;
var str = 'string';
var undef = undefined;
var $null = null;
var nan = NaN;
console.log(a, str);
document.write(a);
document.write('<hr>');
document.write(str);
console.log(typeof str);*/
//var login = prompt('Ваш логин:');
/*password = +prompt('Ваш пароль:');*/
/* b = +prompt('Введите число 2');
var summ = a + b;
alert('Сумма = '+summ);*/
/*
Number();
String();
parseInt('1qweqweq'); //for integer
parseFloat('22123.1231asdasdasd'); //for char
'alex'.toLocaleUpperCase(); //upper case
'ALEX'.toLocaleLowerCase(); //lower case
Math.round(123.231);//okruglenie
Math.random();// random*/
/*
if (login==='alex' && password===123) {
alert('Hello Admin '+login);
alert('LOGINED');
} else if (login==='mark' && password===111) {
alert('Hello Moderator '+login);
alert('LOGINED');
} else {
alert('U ARE NOT ADMIN. BYE!');
alert('NOT LOGINED');
}*/
/*switch (login) {
case 'alex' : alert('Hello admin'); break;
case 'mark' : alert('Hello moderator'); break;
case 'battman' : alert('Hello user'); break;
default: alert('U ARE NOT LOGGINET'); break;
}*/
// login==='alex' ? alert('HELLO') : alert('BYE!'); // trenarnyi operator
//1,3,5,-9,-15,0
/* alert(Math.min(1,3,5,-9,-15,0));
alert(Math.max(1,3,5,-9,-15,0));
alert(1+3+5+-9+-15+0);
alert(1*3*5*-9*-15*0);
*/
document.write('<p>'+'MIX = '+Math.min(1,3,5,-9,-15,0)+'</p>');
document.write('<p>'+'MAX = '+Math.max(1,3,5,-9,-15,0)+'</p>');
document.write('<p>'+'SUM = '+(1+3+5+-9+-15+0)+'</p>');
document.write('<p>'+'SUM = '+(1*3*5*-9*-15*0)+'</p>');
</script>
</body>
</html>