Skip to content

Conversation

@tiffanyarnold
Copy link

No description provided.

function getCountriesSortedByPopulation() {
function getCountriesSortedByPopulation(arr) {

return arr

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which array method can we use to organize by ascending or descending order?

// return newArray
// };

let even = ['']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want even to be an array with an empty string in it or just an empty array?


let even = ['']
for (let i = 0; i < arr.length; i++) {
if (arr[i] % 2 === 0) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reconsider what this conditional is checking. What does arr[i] evaluate to?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants