/ / returns the name of each series and the total number of courses in each series (the total number of lesson);
the environmental background of the problems and what methods you have tried
related codes
const Series = [{
name: "Web",
courses: [{
name: "HTML",
lessons: [{
name: "HTML Lesson 1"
},{
name: "HTML Lesson 2"
},{
name: "HTML Lesson 3"
}]
},{
name: "CSS",
lessons: [{
name: "CSS Lesson 1"
},{
name: "CSS Lesson 2"
},{
name: "CSS Lesson 3"
},{
name: "CSS Lesson 4"
}]
},{
name: "JavaScript",
lessons: [{
name: "JavaScript Lesson 1"
},{
name: "JavaScript Lesson 2"
}]
}]
},{
name: "PHP",
courses: [{
name: "Linux",
lessons: [{
name: "Linux Lesson 1"
},{
name: "Linux Lesson 2"
}]
},{
name: "MySQL",
lessons: [{
name: "MySQL Lesson 1"
},{
name: "MySQL Lesson 2"
},{
name: "MySQL Lesson 3"
},{
name: "MySQL Lesson 4"
}]
},{
name: "Nginx",
lessons: [{
name: "Nginx Lesson 1"
},{
name: "Nginx Lesson 2"
},{
name: "Nginx Lesson 3"
},{
name: "Nginx Lesson 4"
}]
}]
}]
function output3(Series){
// ...
}
output3(Series)
sources of topics and their own ideas
aitschool
for solutions and ideas