Public
Edited
May 14
Fork of 1. Task
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
allSocialString = {
const allSocials = [];
users.forEach( userItem =>{
const userSocial = userItem.social;

if( ! allSocials.includes(userSocial)){
allSocials.push(userSocial)
}
})
return allSocials;
}

Insert cell
counters = ({})
Insert cell
{
allSocialString.forEach( socialName =>{
counters[ socialName ] = 0;
})
}
Insert cell
counters
Insert cell
{
users.forEach( userObject =>{
const userSocial = userObject.social;
counters[ userSocial ] += 1;
} )
}
Insert cell
counters
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more