Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.1 kB
8
Indexable
Never
//////////////////////////////
// TCS Trainee Program - JS //
//////////////////////////////


interface UserInterface {
name: string
id: string
password: string
}

let userList: UserInterface[] = []

const users = [
{
	name: 'Beatriz Mello',
    id: 04,
    password: 'abc'
},
{
	name: 'Marcio Barbosa',
    id: 02,
    password: '12345'
},
{
	name: 'Guilherme Gabriel',
    id: '03',
    password: 'senha123'
},
{
	name: 'Guilherme Canesin',
    id: '01',
    password: null
},
]

// Instructions
//
// You cannot change the interface or the const values
// Try not to google anything
// You can ask for help anytime.

// ----------  TASK 01 --------------------
// Add the values of users inside userList.
// ----------------------------------------

// ----------  TASK 02 --------------------
// print all the names in the userList.
// ----------------------------------------

// ----------  TASK 02 --------------------
// filter list to show only names that *includes* Guilherme
// ----------------------------------------