-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlesson6.html
More file actions
71 lines (49 loc) · 1.27 KB
/
lesson6.html
File metadata and controls
71 lines (49 loc) · 1.27 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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Getting Started wiht JAVA Script</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>
<div class="jumbotron text-center">
<button type="button" class="btn btn-danger" onclick="sayHello('First button SAY')">
My Button
</button>
</div>
<div class="jumbotron text-center">
<button type="button" class="btn btn-danger" onmouseover="sayHello('SECOND button SAY')">
My Button
</button>
</div>
<script>
function sayHello(message = 'goodby', whisper = false){
if (whisper){
console.log(`%c${message}`,'font-size:5px');
} else {
console.log(message);
}
}
sayHello('hello',true);
sayHello();
sayHello('hello');
// function squared(a){
// return a*a;
// }
const squared = function(a){
return a*a;
}
rect = squared
// anlog syntax
const cube = (a) => {
return a*a*a;
}
console.log(squared(3));
//in java function may be called BEFORE it's declared
punch();
function punch(){
console.log('Punch');
}
</script>
</body>
</html>