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

NW5-Manchester-Sandra Duarte-JavaScript-core-1-Week3 - #131

Open
Sandra-Duarte wants to merge 5 commits into
CodeYourFuture:mainfrom
Sandra-Duarte:main
Open

NW5-Manchester-Sandra Duarte-JavaScript-core-1-Week3#131
Sandra-Duarte wants to merge 5 commits into
CodeYourFuture:mainfrom
Sandra-Duarte:main

Conversation

@Sandra-Duarte

@Sandra-Duarte Sandra-Duarte commented Sep 22, 2022

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.

Good work I've called out a few errors, but left you to figure out exactly what they are so it sticks, let me know if you struggle with that I see you've missed the 4th one, it's pretty hard but I'm sure you know enough to make a good start if you do it



// Example 4
// This array has 3 elemente 0,1,2.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Correct

}

sayHelloToUser();
// the argument doesn't pass

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Correct

console.log(a);

console.log(a);
// we can print the value because (a)was not declared. let a = 2;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Techincally, it's been declared but not dinfied, but I get what you mean and it's right

// we can print the value because (a)was not declared. let a = 2;

// Example 2
function sayHello() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why does this function return undefined?

let string = "";
let count = 0;
while(count < n) {
string += `${even[count]},`;

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 looking good, love how you used ` They're so good :)

function getRandomNumberGreaterThan50() {
// TODO - implement using a do-while loop
let number = 0;
do{

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 all tests pass on this one

@@ -15,6 +15,13 @@ function getTemperatureReport(cities) {
// TODO
}

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 file throws an exception when run, specfically a "ReferenceError: cities is not defined" Can you see why?

total += article.length;
}

return Math.round(total / allArticleTitles.length);

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 line cause a problem. Can you see why?

function headlinesWithNumbers(allArticleTitles) {
// TODO
return allArticleTitles.filter((article) => {
return /\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.

Good work, I'm not sure if you've been taught regular expressions yet but they're very useful beasts indeed

function headlinesWithNumbers(allArticleTitles) {
// TODO
return allArticleTitles.filter((article) => {
return /\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.

Good work, I'm not sure if you've been taught regular expressions yet but they're very useful beasts indeed

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