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

NW5-Manchester-Khadar-M-Dagal JS1-W3 - #152

Open
khmdagal wants to merge 9 commits into
CodeYourFuture:mainfrom
khmdagal:main
Open

NW5-Manchester-Khadar-M-Dagal JS1-W3#152
khmdagal wants to merge 9 commits into
CodeYourFuture:mainfrom
khmdagal:main

Conversation

@khmdagal

Copy link
Copy Markdown

No description provided.

@Ara225 Ara225 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks really good called a couple things out and noted 4 isn't finished, butr you've made a decent start


/*Answer
The code in example 1 will output undefined beasue a value has not been assigned to variable a,
So, when the program exacutes the code in line 14 will not get any output value.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Very good! All your answers here are fairly clear and detailed, they show a good understanding level

// TODO
// TODO
let i = 0;
while (i % 2 === 0) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

So, this looks good from a distance but it doesn't quite work as intended. The loop will only run once whatever number you pass to the function. Can you see why?

let i = 0;
while (i < birthdays.length) {
if (birthdays[i].includes('July')) {
return birthdays[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.

Works, good work, bit much commnented out code here I would say See: https://syllabus.codeyourfuture.io/guides/code-style-guide#dont-leave-lots-of-commented-out-code

for (let i = 0; i < n; i++){
if (i >0 && i % 2 === 0) {
arr.push(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.

This is decent code but it doesn't "return the sum of the first n even numbers (starting from 0)"

// }

for (let i = 0; i < 26; i++) {
console.log(String.fromCharCode(97 + 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.

Good work

@@ -4,13 +4,20 @@

// TODO Use a for-of loop to output each of the tube stations below.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All good here!


}

// console.log(getTemperatureReport(["London", "Paris", "São Paulo"]));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bit too much commented out code here but the tests pass and the non commented out code looks good, so good work

let i = 0;
do {
i = generateRandomNumber();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tests pass, good work

let i = 0;
do {
i = generateRandomNumber();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tests pass, good work

// TODO
// TODO

return allArticleTitles.filter(article => /\d/.test(article));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice use of a regex here, they're a really useful tool if you can get past the intial complexity of them

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.

2 participants