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

WM4-Abdirahim-Hussein-JavaScript Core 1-Week-3 - #94

Open
12shussein wants to merge 6 commits into
CodeYourFuture:mainfrom
12shussein:main
Open

WM4-Abdirahim-Hussein-JavaScript Core 1-Week-3#94
12shussein wants to merge 6 commits into
CodeYourFuture:mainfrom
12shussein:main

Conversation

@12shussein

Copy link
Copy Markdown

No description provided.


while (i < birthdays.length - 1) {
let birthdayCheck = birthdays[i];
if (birthdayCheck.startsWith("July")) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How about using 'includes' method?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

.starts with July! Always learning! I have used the .includes method but it is nice to see other ways of doing it

@PakizeBozkurt PakizeBozkurt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great job Abdirahim. 🥇

@AlessandraCYF AlessandraCYF 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.

Interesting addition of the j.
I, for example, just used sum = i * (i + 1); following from n(n+1) as the formula for calculating the sum of consecutive even numbers.

@Pat-On Pat-On 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.

Hey. I see that You did great progress and you keep studying hard.
You understand the concept of for loop and the theory of why we may receive undefined.

Please finish the last parts of the exercises :)

Comment thread 1-exercises/D-do-while/exercise.js
Comment thread 1-exercises/E-for-loop/exercise1.js Outdated
@@ -8,7 +8,8 @@
// Change the below code to use a for loop instead of a while loop.
let i = 0;
while(i < 26) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please think over the logic of this solution because we got into the infinite loop and use only the while loop that should replace a for loop.

];

// TODO - Write for loop code here
for (let i = 0; i <WRITERS.length; 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.

I see that You understand the for loop logic. Nicely done!

@@ -13,6 +13,12 @@

function getTemperatureReport(cities) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You are very close to finishing this exercise.

Please think over it and modify your solution in the way that You are going to pass these test cases:
✕ should return a temperature report for the user's cities (10 ms)
✕ should return a temperature report for the user's cities (alternate input) (1 ms)

Tip: Check what exactly you are pushing in line 19 to the array.

@@ -15,15 +17,26 @@ function potentialHeadlines(allArticleTitles) {
*/
function titleWithFewestWords(allArticleTitles) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You are so close to solving the last two test cases.
Please improve your solution and pass the last two requirements:
✕ should return the title with the fewest words (1 ms)
✕ should return the average number of characters in a headline

Comment thread 2-mandatory/4-stocks.js
});
}

/*

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please finish last part of the exercise:

function highestPriceDescriptions(closingPricesForAllStocks, stocks) {
    // TODO
}

@PakizeBozkurt PakizeBozkurt left a comment

Copy link
Copy Markdown
Member

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.

4 participants