質問編集履歴

1

配列内の値はstring型

2021/05/16 07:06

投稿

sohh
sohh

スコア6

test CHANGED
File without changes
test CHANGED
@@ -1,11 +1,11 @@
1
1
  ```.js
2
2
 
3
- array= [apple, banana, orange]
3
+ array= ["apple", "banana", "orange"]
4
4
 
5
5
 
6
6
 
7
7
  // 上の配列を下のように変換したい
8
8
 
9
- editedArray = [{fruits: apple}, {fruits:banana}, {fruits: orange}]
9
+ editedArray = [{fruits: "apple"}, {fruits: "banana"}, {fruits: "orange"}]
10
10
 
11
11
  ```