1. Write a JavaScript program to generate n number of random numbers and store them
    in an array. Sort the generated numbers in ascending order using array sort method.
    Develop separate functions to find mean and median of numbers that are in the array.
    Display the results with appropriate messages.

Dumping an assignment to a post without at least saying that is what you are doing isn't the most polite way to start a conversation, especially if you don't show any of your own effort to solve the problem.

It also isn't the safest approach, since plenty of professors regularly search the web to catch students doing things such as this (or more often, they get their TAs and grad students to do it for them).

There are websites where they will do your homework for you, at least for a fee. This isn't one of those sites.

So, try to solve it yourself, and if you get stuck, let us know what you've tried and we'll see if we can help you then.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.