Skip to content

Javascript qstn #147

@Knaresh1993

Description

@Knaresh1993

[2:54 pm, 03/08/2021] 🍫🍫: 1. Given values on the next page, write a function that returns an array of strings in the
following format
["Norah | AAA-6818 | 564.67","Norah | AAA-4671 | 138971.19"]
2. Execute your function and output the results as an array in console log for the following
scenarios:
A) filtered by Norah with all account types (ROT, IRA, AAA)
B) filtered by account type sorted by balance ascending
C) filtered by Alyx with IRA account type; sorted by balance descending
D) filtered by All users; sorted by balance ascending
users = [
{
id: "1",
name: "Norah"
},
{
id: "2",
name: "Alyx"
}
];
accounts = [
{
account: "IRA-4679",
user: "1",
balance: "5175.36"
},
{
account: "AAA-3571",
user: "1",
balance: "3896342.08"
},
{
account: "AAA-4671",
user: "1",
balance: "138971.19"
},
{
account: "ROT-1687",
user: "2",
balance: "2686.00"
},
{
account: "AAA-7894",
user: "2",
balance: "68761.32"
},
{
account: "IRA-6818",
user: "2",
balance: "564.67"
},
{
account: "IRA-6819",
user: "2",
balance: "4564.67"
}
};

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