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

NW5-Ahmed_Mahmoud-JavaScript-Core-1-Coursework-Week3 - #137

Open
Danti8686 wants to merge 13 commits into
CodeYourFuture:mainfrom
Danti8686:main
Open

NW5-Ahmed_Mahmoud-JavaScript-Core-1-Coursework-Week3#137
Danti8686 wants to merge 13 commits into
CodeYourFuture:mainfrom
Danti8686:main

Conversation

@Danti8686

@Danti8686 Danti8686 commented Sep 23, 2022

Copy link
Copy Markdown
  • Your Name: Ahmed Mahmoud
  • Your City: Manchester
  • Your Slack Name: Danti

Homework Details

  • Module: JavaScript-Core-1
  • Week: Week3

// Example 4
let arr = [1,2,3];
console.log(arr[3]);
console.log(arr[3]);// because the arr has 3 item and the firest item start with 0 and 1 and 2 but there is no for item.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think you mean similar to me, //in this example we don't have arr[3], because we just have [0],[1].[2]and we don't have it.

function evenNumbersSum(n) {
// TODO
}
const ourArray = [];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey Danti, I can see the approach your going for here, but it looks like you forgot to include some code - this file doesn't run and references a missing function sumEvens


do {
generatedNumber = generateRandomNumber();
} while(generatedNumber <= 50);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The exercie says number greater than 50 not greater than or equal so please try to stick in with reqirements. I know as small issue but it will help you to stick to exact instructions, you do generatedNumber < 50 not this generatedNumber <= 50

*/
function titleWithFewestWords(allArticleTitles) {
// TODO
let fewestWordsSoFar;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Always a good idea to assign the number var to 0 to avoid random number being put into the variable by the js compiler
so make like this let fewestWordsSoFar = 0;

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.

4 participants