Question

I need an answer as soon as I can get one Please ! Thnx! // Given...

I need an answer as soon as I can get one Please ! Thnx!

// Given an array of college graduates. Complete the following requests using any array method you like

const graduates = [

{ id: 1, first_name: "Cynde", university: "Missouri Southern State College", email: "[email protected]" },

{ id: 2, first_name: "Saundra", university: "The School of the Art Institute of Chicago", email: "[email protected]" },

{ id: 3, first_name: "Lambert", university: "Marian College", email: "[email protected]" },

{ id: 4, first_name: "Modestine", university: "International Medical & Technological University", email: "[email protected]" },

{ id: 5, first_name: "Chick", university: "Sultan Salahuddin Abdul Aziz Shah Polytechnic", email: "[email protected]" },

{ id: 6, first_name: "Jakob", university: "Fachhochschule Rosenheim, Hochschule für Technik und Wirtschaft", email: "[email protected]" },

{ id: 7, first_name: "Robbi", university: "Salem University", email: "[email protected]" },

{ id: 8, first_name: "Colline", university: "Coastal Carolina University", email: "[email protected]" },

{ id: 9, first_name: "Michail", university: "Universidad Católica de Ávila", email: "[email protected]" },

{ id: 10, first_name: "Hube", university: "Universitat Rovira I Virgili Tarragona", email: "[email protected]" },

];

/* Request 1: Create a new array called universities that contains all the universities in the graduates array. This will be an array of strings.

Once you have the new array created, sort the universities alphabetically and log the result. */

const universities = [];

console.log(universities);

/* Request 2: Create a new array called contactInfo that contains both first name and email of each student. This will be an array of strings.

The resulting contact information strings should have a space between the first name and the email, like this:

"Josh [email protected]"

Log the result of your new array. */

const contactInfo = [];

console.log(contactInfo);

/* Request 3: Find out how many universities have the string "Uni" included in their name. Create a new array called unisWithUni that contains them all. This will be an array of objects. Log the result. */

const unisWithUni = [];

console.log(unisWithUni);

0 0
Add a comment Improve this question Transcribed image text
Answer #1

If you have any doubts, please give me comment...

// Given an array of college graduates. Complete the following requests using any array method you like

const graduates = [

    { id: 1, first_name: "Cynde", university: "Missouri Southern State College", email: "[email protected]" },

    { id: 2, first_name: "Saundra", university: "The School of the Art Institute of Chicago", email: "[email protected]" },

    { id: 3, first_name: "Lambert", university: "Marian College", email: "[email protected]" },

    { id: 4, first_name: "Modestine", university: "International Medical & Technological University", email: "[email protected]" },

    { id: 5, first_name: "Chick", university: "Sultan Salahuddin Abdul Aziz Shah Polytechnic", email: "[email protected]" },

    { id: 6, first_name: "Jakob", university: "Fachhochschule Rosenheim, Hochschule für Technik und Wirtschaft", email: "[email protected]" },

    { id: 7, first_name: "Robbi", university: "Salem University", email: "[email protected]" },

    { id: 8, first_name: "Colline", university: "Coastal Carolina University", email: "[email protected]" },

    { id: 9, first_name: "Michail", university: "Universidad Católica de Ávila", email: "[email protected]" },

    { id: 10, first_name: "Hube", university: "Universitat Rovira I Virgili Tarragona", email: "[email protected]" },

];

/* Request 1: Create a new array called universities that contains all the universities in the graduates array. This will be an array of strings.

Once you have the new array created, sort the universities alphabetically and log the result. */

const universities = [];

for (let i = 0; i < graduates.length; i++) {

    universities.push(graduates[i].university);

}

universities.sort();

console.log(universities);

/* Request 2: Create a new array called contactInfo that contains both first name and email of each student. This will be an array of strings.

The resulting contact information strings should have a space between the first name and the email, like this:

"Josh [email protected]"

Log the result of your new array. */

const contactInfo = [];

for (let i = 0; i < graduates.length; i++) {

    contactInfo.push(graduates[i].first_name + " " + graduates[i].email);

}

console.log(contactInfo);

/* Request 3: Find out how many universities have the string "Uni" included in their name. Create a new array called unisWithUni that contains them all. This will be an array of objects. Log the result. */

const unisWithUni = [];

for (let i = 0; i < universities.length; i++) {

    if (universities[i].indexOf("Uni") != -1)

        unisWithUni.push(universities[i]);

}

console.log(unisWithUni);

nagarajuanagaraju-Vostro-3550:15092019$ node university.js [ 'Coastal Carolina University', Fachhochschule Rosenheim, Hochschule für Technik und Wirtschaft', 'International Medical & Technological University', "Marian College', 'Missouri Southern State College', 'Salem University', 'Sultan Salahuddin Abdul Aziz Shah Polytechnic', 'The School of the Art Institute of Chicago', 'Universidad Católica de Ávila', 'Universitat Rovira I Virgili Tarragona' ] [ 'Cynde ctorry @macromedia.com', "Saundra swhallastate.gov', Lambert lparhamzatechcrunch.com', "Modestine mdolderasymantec.com', "Chick camorts4agoogle.com.au', "Jakob jharken5a spiegel.de', "Robbi rbristerbaredcross.org', "Colline cbroshqalibaba.com', "Michail mrome8ashinystat.com', 'Hube hlethbriggafoxnews.com' ] [ 'Coastal Carolina University' 'International Medical & Technological University', 'Salem University', 'Universidad Católica de Ávila', 'Universitat Rovira I Virgili Tarragona' ]

Add a comment
Know the answer?
Add Answer to:
I need an answer as soon as I can get one Please ! Thnx! // Given...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please!!! need help asap!!!! write a C++program to analyze a small subset of the data that...

    Please!!! need help asap!!!! write a C++program to analyze a small subset of the data that has been collected. See file universities.txt .Use precisely seven parallel arrays: one for name of university, one for state, one for city, one for yearly tuition, one for enrollment, one for average freshman retention, and one for the percent of students who graduate with in six years. Note that the percentage of student accepted is not stored.An output file is opened in main() and...

  • Don't attempt if you can't attempt fully, i will dislike and negative comments would be given...

    Don't attempt if you can't attempt fully, i will dislike and negative comments would be given Please it's a request. c++ We will read a CSV files of a data dump from the GoodReads 2 web site that contains information about user-rated books (e.g., book titnle, publication year, ISBN number, average reader rating, and cover image URL). The information will be stored and some simple statistics will be calculated. Additionally, for extra credit, the program will create an HTML web...

  • Don't attempt if you can't attempt fully, i will dislike a nd negative comments would be...

    Don't attempt if you can't attempt fully, i will dislike a nd negative comments would be given Please it's a request. c++ We will read a CSV files of a data dump from the GoodReads 2 web site that contains information about user-rated books (e.g., book tit le, publication year, ISBN number, average reader rating, and cover image URL). The information will be stored and some simple statistics will be calculated. Additionally, for extra credit, the program will create an...

  • PLEASE I NEED HELP!!! Case One: UConn’s University Information Technology Services (UITS) Develop...

    PLEASE I NEED HELP!!! Case One: UConn’s University Information Technology Services (UITS) Develops a Five-Year Strategic Plan The University of Connecticut was founded in 1881 under the name Storrs Agricultural School. As the name implies, the school was originally focused solely on agricultural studies. In 1893, the school became part of the national land-grant college program, which provided land and funding to one college in each state whose focus was on teaching practical skills in agriculture, engineering, military arts, and...

  • code in java please:) Part I Various public transporation can be described as follows: A PublicTransportation...

    code in java please:) Part I Various public transporation can be described as follows: A PublicTransportation class with the following: ticket price (double type) and mumber of stops (int type). A CityBus is a PublicTransportation that in addition has the following: an route number (long type), an begin operation year (int type), a line name (String type), and driver(smame (String type) -A Tram is a CityBus that in addition has the following: maximum speed (int type), which indicates the maximum...

  • Using Merge Sort: (In Java) (Please screenshot or copy your output file in the answer) In...

    Using Merge Sort: (In Java) (Please screenshot or copy your output file in the answer) In this project, we combine the concepts of Recursion and Merge Sorting. Please note that the focus of this project is on Merging and don't forget the following constraint: Programming Steps: 1) Create a class called Art that implements Comparable interface. 2) Read part of the file and use Merge Sort to sort the array of Art and then write them to a file. 3)...

  • could you please help me with this problem, also I need a little text so I...

    could you please help me with this problem, also I need a little text so I can understand how you solved the problem? import java.io.File; import java.util.Scanner; /** * This program lists the files in a directory specified by * the user. The user is asked to type in a directory name. * If the name entered by the user is not a directory, a * message is printed and the program ends. */ public class DirectoryList { public static...

  • Hi. Could you help me with the code below? I need to validate the code below, using expressions that can carry out the actions or that make appropriate changes to the program’s state, using conditiona...

    Hi. Could you help me with the code below? I need to validate the code below, using expressions that can carry out the actions or that make appropriate changes to the program’s state, using conditional and iterative control structures that repeat actions as needed. The unit measurement is missing from the final output and I need it to offer options to lbs, oz, grams, tbsp, tsp, qt, pt, and gal. & fl. oz. Can this be added? The final output...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT