Skip to content

Commit c0107ff

Browse files
committed
implement an alternative solution to return the values from the author object using a loop
1 parent 1e8685b commit c0107ff

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎Sprint-2/debug/author.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,10 @@ console.log(Object.values(author));
2121
// for (const value of author) {
2222
// console.log(value);
2323
// }
24+
25+
//alternative:
26+
let authorValues = [];
27+
for (const value of Object.values(author)) {
28+
authorValues.push(value);
29+
}
30+
console.log(authorValues);

0 commit comments

Comments
 (0)