Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Classroom Attendance

What You'll Do

Given an object, classroom, return an array of student names

  • The classroom object is structured with two values: hasTeachingAssistant (boolean) and classList (array of strings)
  {
    hasTeachingAssistant: false,
    classList: ["Rashida", "John", "Roman", "Lisa", "Omair", "Lukas"],
  }
  • The teacher will always be the first item in the classList array
  • If hasTeachingAssistant is true, the teaching assistant will be the second item in the classList array

Requirements

  • Use object and array destructuring

Output

[ 'John', 'Roman', 'Lisa', 'Omair', 'Lukas' ]