Skip to content

Commit 2b11eff

Browse files
author
rahmatrhd
committed
first commit
0 parents  commit 2b11eff

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# convert-array-to-object

script.js

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
function convert (data) {
2+
// Your code here
3+
}
4+
5+
// TEST CASES
6+
console.log(convert([
7+
[1, 'Dimitri', 'Wahyudiputra', '[email protected]'],
8+
[2, 'Sergei', 'Dragunov', '[email protected]']
9+
]));
10+
11+
/*
12+
[ { id: 1,
13+
firstName: 'Dimitri',
14+
lastName: 'Wahyudiputra',
15+
email: 'dimitri@mail.com' },
16+
{ id: 2,
17+
firstName: 'Sergei',
18+
lastName: 'Dragunov',
19+
email: 'sergei@mail.com' } ]
20+
*/
21+
22+
console.log(convert([]));
23+
// []

0 commit comments

Comments
 (0)