Skip to content
This repository was archived by the owner on Jan 14, 2024. It is now read-only.

London9_Inna_Poliakova_JS-Week-3 - #195

Open
Innapoliakova wants to merge 2 commits into
CodeYourFuture:mainfrom
Innapoliakova:main
Open

London9_Inna_Poliakova_JS-Week-3#195
Innapoliakova wants to merge 2 commits into
CodeYourFuture:mainfrom
Innapoliakova:main

Conversation

@Innapoliakova

Copy link
Copy Markdown

No description provided.

@ys35code

Copy link
Copy Markdown

Awesome :)

let message = "Hello";
}
// undefined - because function not called

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Here we have defined a function, but we have not done anything with it yet

let hello = sayHello();
console.log(hello);

// undefined - because function not declared

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Here it is undefined because if we look back at line 19 it doesnt look like the function has returned anything yet.

let arr = [1,2,3];
console.log(arr[3]);

// undefind - becouse array isn't conclude element with index 3

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Awesome!

}
console.log(result.join());
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Awesome! 1 Caveat would be does the question ask for the first n? If so do we we want to include n itself. If we do how would we update the code to do so.

return BIRTHDAYS[i];
}
i ++
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👌

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants