FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
hello-javascript/src/index.html at master · codegirls/hello-javascript · GitHub
codegirls
/
hello-javascript
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
hello-javascript
/
src
/
index.html
Copy path
More file actions
More file actions
Latest commit
History
History
History
89 lines (73 loc) · 2.46 KB
Breadcrumbs
hello-javascript
/
src
/
index.html
Copy path
File metadata and controls
89 lines (73 loc) · 2.46 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
"
/>
<
meta
http-equiv
="
X-UA-Compatible
"
content
="
IE=edge
"
/>
<
meta
name
="
viewport
"
content
="
width=device-width, initial-scale=1
"
/>
<
meta
name
="
apple-mobile-web-app-capable
"
content
="
yes
"
/>
<
meta
name
="
mobile-web-app-capable
"
content
="
yes
"
/>
<
title
>
Code Girls Materials: Hello, Javascript
</
title
>
</
head
>
<
style
>
body
{
padding
:
3
rem
;
max-width
:
960
px
;
margin
:
0
auto; }
div
{
background
:
silver;
padding
:
1.5
rem
; }
h1
{
margin-bottom
:
4.5
rem
; }
</
style
>
<
body
>
<
h1
>
Hello, Javascript!
</
h1
>
<
h2
>
JavaScript understands numbers:
</
h2
>
<
div
class
="
js-numbers
"
>
</
div
>
<
script
type
="
text/javascript
"
>
document
.
querySelector
(
'.js-numbers'
)
.
innerText
=
3.141592653589793
;
</
script
>
<
h2
>
JavaScript is a calculator:
</
h2
>
<
div
class
="
js-calculator
"
>
</
div
>
<
script
type
="
text/javascript
"
>
document
.
querySelector
(
'.js-calculator'
)
.
innerText
=
2
/
4
;
</
script
>
<
h2
>
Counting:
</
h2
>
<
div
class
="
js-count
"
>
</
div
>
<
script
type
="
text/javascript
"
>
let
count
=
3
;
count
=
7
;
count
=
count
+
1
;
document
.
querySelector
(
'.js-count'
)
.
innerText
=
count
;
</
script
>
<
h2
>
Functions:
</
h2
>
<
div
class
="
js-function
"
>
</
div
>
<
script
type
="
text/javascript
"
>
let
count2
=
0
;
incrementCount
=
(
)
=>
{
count2
=
count2
+
1
;
}
incrementCount
(
)
;
document
.
querySelector
(
'.js-function'
)
.
innerText
=
count2
;
incrementCount
(
)
;
incrementCount
(
)
;
document
.
querySelector
(
'.js-function'
)
.
innerText
+=
`
${
count2
}
`
;
incrementCount
(
)
;
incrementCount
(
)
;
incrementCount
(
)
;
document
.
querySelector
(
'.js-function'
)
.
innerText
+=
`
${
count2
}
`
;
</
script
>
<
h2
>
Return values:
</
h2
>
<
div
class
="
js-return
"
>
</
div
>
<
script
type
="
text/javascript
"
>
let
count3
=
0
;
incrementCount
=
(
)
=>
{
count3
=
count3
+
1
;
return
count3
;
}
document
.
querySelector
(
'.js-return'
)
.
innerText
=
incrementCount
(
)
;
document
.
querySelector
(
'.js-return'
)
.
innerText
+=
`
${
incrementCount
(
)
}
`
;
document
.
querySelector
(
'.js-return'
)
.
innerText
+=
`
${
incrementCount
(
)
}
`
;
</
script
>
<
h2
>
for-loop:
</
h2
>
<
div
class
="
js-loop
"
>
</
div
>
<
script
type
="
text/javascript
"
>
for
(
let
count4
=
0
;
count4
<
10
;
count4
+=
1
)
{
document
.
querySelector
(
'.js-loop'
)
.
innerText
+=
`
${
count4
}
`
;
}
</
script
>
</
body
>
</
html
>
Back
|
FazBrowse Home
|
New Git URL