FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaScript-Learning/array/remove.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
/
array
/
remove.html
Copy path
More file actions
More file actions
Latest commit
History
History
History
23 lines (17 loc) · 522 Bytes
Breadcrumbs
JavaScript-Learning
/
array
/
remove.html
Copy path
File metadata and controls
23 lines (17 loc) · 522 Bytes
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
<!DOCTYPE html
>
<
html
>
<
head
lang
="
en
"
>
<
meta
charset
="
UTF-8
"
>
<
title
>
移除数组项
</
title
>
<
script
type
="
text/javascript
"
src
="
https://cdn.bootcss.com/jquery/3.2.0/jquery.js
"
>
</
script
>
</
head
>
<
body
>
<
script
>
// https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/splice
var
myFish
=
[
"angel"
,
"clown"
,
"mandarin"
,
"surgeon"
]
;
var
clown
=
myFish
[
1
]
;
myFish
.
splice
(
myFish
.
indexOf
(
clown
)
,
1
)
;
console
.
log
(
myFish
)
;
</
script
>
</
body
>
</
html
>
Back
|
FazBrowse Home
|
New Git URL