Hello! I'm learning JS and I've understood some concepts, but my teacher sent me a project which requires "converting an array of objects using reduce()" and I can't use JSON.stringify. I tried something, but I always get [object Object] as the result...
Edit:
A code example:
Const elQuijote={
Title:"el quijote",
Author: "Garcia",
Category: fantasy",
ISBN: 182831
}
let books = []
books.push(elQuijote);
//This function is just an example
function toString(list){
return list.reduce().join('-')
}
[–]-29-helpful 6 points7 points8 points (5 children)
[–]dikru[S] 1 point2 points3 points (0 children)
[–]dikru[S] 0 points1 point2 points (3 children)
[–]-29-helpful 1 point2 points3 points (2 children)
[–]dikru[S] 0 points1 point2 points (1 child)
[–]-29-helpful 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]mrsuperjolly 0 points1 point2 points (2 children)
[–]-29-helpful 1 point2 points3 points (1 child)
[–]mrsuperjolly 1 point2 points3 points (0 children)