Code for analyzing the financial records.
Given: a dataset composed of arrays with two fields, Date and Profit/Losses.
Task: write JavaScript code that analyzes the records to calculate each of the following:
-
The total number of months included in the dataset.
-
The net total amount of Profit/Losses over the entire period.
-
The average of the changes in Profit/Losses over the entire period.
-
The greatest increase in profits (date and amount) over the entire period.
-
The greatest decrease in profits (date and amount) over the entire period.
Obtained information : -Youtube -W3Schools -MDN
Licenced under the MIT license.
*Copyright © 2023 Radu Oros