NW5-Manchester-Khadar-M-Dagal JS1-W3 - #152
Conversation
Ara225
left a comment
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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); | ||
| }; |
There was a problem hiding this comment.
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)); |
| @@ -4,13 +4,20 @@ | |||
|
|
|||
| // TODO Use a for-of loop to output each of the tube stations below. | |||
|
|
||
| } | ||
|
|
||
| // console.log(getTemperatureReport(["London", "Paris", "São Paulo"])); |
There was a problem hiding this comment.
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(); | ||
|
|
| let i = 0; | ||
| do { | ||
| i = generateRandomNumber(); | ||
|
|
| // TODO | ||
| // TODO | ||
|
|
||
| return allArticleTitles.filter(article => /\d/.test(article)); |
There was a problem hiding this comment.
Nice use of a regex here, they're a really useful tool if you can get past the intial complexity of them
No description provided.