JavaScript Fundamentals -- Arrays in JavaScript

Exercise 1 Review


Here is a possible solution to this exercise:

// map and filter
const courses = [
  { name: 'JavaScript Fundamentals' },
  { name: 'Angular CLI Basics' },
  { name: 'Deploying Apps to Netlify' }

// 1. Use the map method to create an array of course names (strings only) from the courses array
const courseNames = =>;

// 2. Use the filter method to create an array from the courses array where the only item is the one with a name of 'JavaScript Fundamentals'
const filtered = courses.filter(course => === 'JavaScript Fundamentals');

You can view the solution on StackBlitz.