Skip to content
Advertisement

Calculate Percentage of each key in Object

So I have this data, how can I compute their respective percentages?

JavaScript

Thank you

Advertisement

Answer

A simple reference for you by using reduce()

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement