First, run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
Please answer the following questions with reference to the provided file data.json
.
-
Write a JS expression that returns the number of DIRECTORS.
-
Write a JS expression that returns the number of SHAREHOLDERS.
-
Write a JS expression that lists the full names of all position holders.
4A. Is Product B hardware or software?
4B. Does Product A have a price of “100”?
4C. Is the launch date of Product B the 6th January 2010?
-
Write a JS expression that prints the effective date formatted in YYYY-MMM-DD format.
-
What is the JSON address in object notation that stores Robert Johnson’s email address?
-
Write a JS expression that returns an array of all unique email domains of the position holders.
-
Write a JS expression that returns an array of objects containing the names and email addresses of all DIRECTORS.
-
Write a JS function that takes an email domain as a parameter and returns an array of objects containing the names, email addresses, and corresponding _id of all position holders whose email addresses belong to the specified domain.
-
Write a JavaScript function that returns an array of objects containing the names and email addresses of the top 3 shareholders with the highest number of shares. The function should only consider shareholders whose email addresses belong to the “example.com” domain. To determine the top shareholders, consider the following criteria: ● The number of shares held by each shareholder is stored in a separate array called “shareholdings”, you need to correlate this with the “global.positions” array. ● The order of shareholders in the “global.positions” array corresponds to the order of their shareholdings in the “shareholdings” array. ● The length of the “shareholdings” array is equal to the number of shareholders.