Skip to content

Students - Grading #6

@wesharper

Description

@wesharper

While this technically works, what if the array were much longer? What if the array changed from time to time? How can the code be changed so that you don't have to manually select each item in the array and print them on 4 separate lines?

var x = firstLast(students[0]);
var y = firstLast(students[1]);
var a = firstLast(students[2]);
var b = firstLast(students[3]);
console.log(x);
console.log(y);
console.log(a);
console.log(b);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions