FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaScript-DOM/26_with_multiple_value.js at master · last-endcode/JavaScript-DOM · GitHub
last-endcode
/
JavaScript-DOM
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
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
JavaScript-DOM
/
26_with_multiple_value.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
25 lines (20 loc) · 699 Bytes
Breadcrumbs
JavaScript-DOM
/
26_with_multiple_value.js
Copy path
File metadata and controls
25 lines (20 loc) · 699 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
24
25
const
member
=
[
'lutfy'
,
'Zoro'
,
'Sanji'
]
;
localStorage
.
setItem
(
'SHP'
,
JSON
.
stringify
(
member
)
)
;
// getItem lutfy
const
lutfyy
=
JSON
.
parse
(
localStorage
.
getItem
(
'SHP'
)
)
;
// index 0 without JSON.parse will print [,
// index 1 will print l, dsst
console
.
log
(
lutfyy
[
0
]
)
;
let
marineford
;
if
(
localStorage
.
getItem
(
'marineford'
)
)
{
marineford
=
JSON
.
parse
(
localStorage
.
getItem
(
'marineford'
)
)
;
}
else
{
marineford
=
[
]
;
}
console
.
log
(
marineford
)
;
// []
// marineford.push('kizaru');
// // marineford.push('akainu');
// localStorage.setItem('marinford', JSON.stringify(marineford));
marineford
.
push
(
'Garp'
)
;
marineford
.
push
(
'akainu'
)
;
localStorage
.
setItem
(
'marineford'
,
JSON
.
stringify
(
marineford
)
)
;
Back
|
FazBrowse Home
|
New Git URL