{
return (variable / total_population) * 100000;
}
Per capita function
function percapita(variable, total_population) {
return (variable / total_population) * 100000;
}
console.log(percapita(25000, 50000));
let highest_pop = 0;
let lowest_pop = 1000000;
let highest_row, lowest_row;
for (let row of data) {
if (???) {
highest_pop = row.population;
highest_row = row;
}
if (???) {
lowest_pop = row.population;
lowest_row = row;
}
}
return {highest_row, lowest_
function percapita(variable, total_population) {
return (variable / total_population) * 100000;
}
console.log(percapita(25000, 50000));