HR needs some information on the new interns put into a database. Given an id, email, first name, and gender. Create an object for each person in the company list:
// 1, [email protected], Mitzi, F
// 2, [email protected], Kennan, M
// 3, [email protected], Keven, M
// 4, [email protected], Gannie, M
// 5, [email protected], Antonietta, F
// Example format of an intern object: 1, [email protected], Example, F
const example = {
id: 0,
name: "Example",
email: "[email protected]",
gender: "F"
};
// Write your intern objects here:
const intern = {
id: 1,
name: "Mitzi",
email: "[email protected]",
gender: "F"
};
console.log(intern.name);
const example = {
id: 2,
name: "Kennan",
email: "[email protected]",
gender: "M"
};
console.log(kennan.id);
const example = {
id: "3",
name: "Keven",
email: " [email protected]",
gender: "M"
};
console.log(keven.email);
const example = {
id: "4",
name: "Gannie",
email: "[email protected]",
gender: "M"
};
console.log(gannie.name);
const example = {
id: "5",
name: "Antonietta",
email: "[email protected]",
gender: "F"
};
console.log(antonietta.gender);
// ==== Challenge 2: Reading Object Data ====
// Once your objects are created, log out the following requests from HR into the console:
// Mitzi's name
console.log(intern.name);
// Kennan's ID
console.log(kennan.id);
// Keven's email
console.log(keven.email);
// Gannie's name
console.log(gannie.name);
// Antonietta's Gender
console.log(antonietta.gender);
// ==== Challenge 3: Object Methods ====
// Give Kennan the ability to say "Hello, my name is Kennan!" Use the console.log provided as a hint.
// console.log(kennan.speak());
// Antonietta loves math, give her the ability to multiply two numbers together and return the product. Use the console.log provided as a hint.
//console.log(antonietta.multiplyNums(3,4));
If you have any doubts,please give me comment...
// Example format of an intern object: 1, [email protected], Example, F
const example = {
id: 0,
name: "Example",
email: "[email protected]",
gender: "F"
};
// Write your intern objects here:
const intern = {
id: 1,
name: "Mitzi",
email: "[email protected]",
gender: "F"
};
const kennan = {
id: 2,
name: "Kennan",
email: "[email protected]",
gender: "M",
speak: function() {
return "Hello, my name is Kennan!";
}
};
const keven = {
id: "3",
name: "Keven",
email: " [email protected]",
gender: "M"
};
const gannie = {
id: "4",
name: "Gannie",
email: "[email protected]",
gender: "M"
};
const antonietta = {
id: "5",
name: "Antonietta",
email: "[email protected]",
gender: "F",
multiplyNums = function(a, b) {
return a * b;
}
};
// ==== Challenge 2: Reading Object Data ====
// Once your objects are created, log out the following requests from HR into the console:
// Mitzi's name
console.log(intern.name);
// Kennan's ID
console.log(kennan.id);
// Keven's email
console.log(keven.email);
// Gannie's name
console.log(gannie.name);
// Antonietta's Gender
console.log(antonietta.gender);
// ==== Challenge 3: Object Methods ====
// Give Kennan the ability to say "Hello, my name is Kennan!" Use the console.log provided as a hint.
console.log(kennan.speak());
// Antonietta loves math, give her the ability to multiply two numbers together and return the product. Use the console.log provided as a hint.
console.log(antonietta.multiplyNums(3, 4));
Get Answers For Free
Most questions answered within 1 hours.