Skip to content

Conversation

@ftwash
Copy link

@ftwash ftwash commented Jan 19, 2021

No description provided.

function countNumbers() {

function countNumbers(arr) {
arr = {[]}

Choose a reason for hiding this comment

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

Remember to declare your variables with a let or const in front of them. Also, an empty object requires only curly braces, no square brackets necessary.

function countNumbers(arr) {
arr = {[]}
for(let i = 0; i < arr.length; i++){
return

Choose a reason for hiding this comment

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

What is this function asking us to return? Do we want to return inside of our for loop?

function removeEvenStrings(arr) {
let newArr = []
for(let i = 0; i < arr.length; n++){
if(i[0] % 2 === 1){

Choose a reason for hiding this comment

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

Recall how to index into arrays. What is the variable name for our array and what is the variable name for our index?

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