Skip to content
Advertisement

count how many people join in 1st half and 2nd half

enter image description here

JavaScript

the output I want that is like in the year 1980 people who join in 1st half and 2nd half in dictionary form

like this {1980:{H1:3, H2:0}, 1981:{H1:7, H2:8},…..}

Advertisement

Answer

You’re close, but you need to set 0 somewhere, and accumulate some results

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