質問編集履歴
1
閉じカッコが一つ抜けていました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,6 +1,56 @@
|
|
1
1
|
```ここに言語を入力
|
2
2
|
|
3
|
+
【誤記】
|
4
|
+
|
5
|
+
|
6
|
+
|
3
7
|
window.localStorage = window.localStorage || (function) {
|
8
|
+
|
9
|
+
var storage = {};
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
return {
|
14
|
+
|
15
|
+
setItem: function(key, value) {
|
16
|
+
|
17
|
+
storage[key] = value;
|
18
|
+
|
19
|
+
},
|
20
|
+
|
21
|
+
getItem: function(key) {
|
22
|
+
|
23
|
+
return storage[key];
|
24
|
+
|
25
|
+
},
|
26
|
+
|
27
|
+
removeItem: function(key) {
|
28
|
+
|
29
|
+
delete storage[key];
|
30
|
+
|
31
|
+
},
|
32
|
+
|
33
|
+
clear: function() {
|
34
|
+
|
35
|
+
storage = {}:
|
36
|
+
|
37
|
+
},
|
38
|
+
|
39
|
+
emulated: true
|
40
|
+
|
41
|
+
};
|
42
|
+
|
43
|
+
})();
|
44
|
+
|
45
|
+
```
|
46
|
+
|
47
|
+
```
|
48
|
+
|
49
|
+
【訂正】
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
window.localStorage = window.localStorage || (function() {
|
4
54
|
|
5
55
|
var storage = {};
|
6
56
|
|