-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjs.html
100 lines (57 loc) · 1.14 KB
/
js.html
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
90
91
92
93
94
95
96
97
98
99
100
---
layout: default
title: Java Script
---
<svg height="500px">
<rect x="50px" y="100px" width="150px" height="100px" fill="red" class="box" />
</svg>
<script>
var say_text = function(txt) {
consol.log(txt)
}
say_text("Hello!");
say_text("Goodbye!");
var plusten = function(num){
var newnum = num + 10
return newnum;
}
var thirty = plusten(20)
consol.log(thirty)
var mynumber = 12;
if (mynumber > 10) {
console.log("greater than 10!");
}
else if (mynumber == 10) {
console.log("it is 10!");
}
]
else {
console.log("less than 10!");
}
function greaterthanten(num) {
if (mynumber > 10) {
console.log("greater than 10!");
}
else if (mynumber == 10) {
console.log("it is 10!");
}
]
else {
console.log("less than 10!");
}
return num > 10;
}
console.log(greaterthanten(20))
}
var h1 = document.getElementById("name");
h1.innerHTML = "Paris"
console.log(h1);
above everything
<h1= class="name">Name</h1>
<h1= class="name">Name</h1>
console.log(d3.max([2,6,10,2,4]));
var h1 = d3.selectAll("#name")
.attr("class", "big")
.style("color", "red");
console.log(h1);
</script>