FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaScript-Learning/examples/array.html at master · xiazhe/JavaScript-Learning · GitHub
xiazhe
/
JavaScript-Learning
Public
Notifications
You must be signed in to change notification settings
Fork
3
Star
4
Code
Issues
0
Pull requests
1
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
JavaScript-Learning
/
examples
/
array.html
Copy path
More file actions
More file actions
Latest commit
History
History
History
50 lines (46 loc) · 1.37 KB
Breadcrumbs
JavaScript-Learning
/
examples
/
array.html
Copy path
File metadata and controls
50 lines (46 loc) · 1.37 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"
>
<
html
>
<
head
>
<
title
>
New Document
</
title
>
<
meta
name
="
Generator
"
content
="
EditPlus
"
>
<
meta
name
="
Author
"
content
=""
>
<
meta
name
="
Keywords
"
content
=""
>
<
meta
name
="
Description
"
content
=""
>
</
head
>
<
body
>
<
script
type
="
text/javascript
"
>
var
arr
=
[
"Jerry"
,
"Tom"
,
"Candy"
,
"Thomas"
]
;
arr
.
pop
(
)
;
console
.
log
(
arr
)
;
//Array[4] 0: "Jerry" 1: "Nick" 2: "Tom" 3: "lilei" length: 4__proto__: Array[0] array.html:15
console
.
log
(
arr
.
pop
(
)
)
;
//Candy
//undefined
console
.
log
(
arr
)
;
//["Jerry", "Tom"] VM90:2
//undefined
console
.
log
(
arr
.
join
(
)
)
;
//Jerry,Tom VM97:2
//undefined
arr
.
push
(
"Nick"
)
//3
console
.
log
(
arr
)
;
//["Jerry", "Tom", "Nick"] VM120:2
//undefined
arr
.
push
(
"lilei"
,
"hanmeimei"
)
//5
console
.
log
(
arr
)
;
//["Jerry", "Tom", "Nick", "lilei", "hanmeimei"] VM122:2
//undefined
arr
.
reverse
(
)
//["hanmeimei", "lilei", "Nick", "Tom", "Jerry"]
arr
.
shift
(
)
//"hanmeimei"
console
.
log
(
arr
)
;
//["lilei", "Nick", "Tom", "Jerry"] VM205:2
//undefined
arr
.
sort
(
)
//["Jerry", "Nick", "Tom", "lilei"]
</
script
>
</
body
>
</
html
>
Back
|
FazBrowse Home
|
New Git URL