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

London 9-Sana Asaf- JavaScript-Core-1-Coursework-Week3 - #197

Open
SanaAsaf wants to merge 2 commits into
CodeYourFuture:mainfrom
SanaAsaf:main
Open

London 9-Sana Asaf- JavaScript-Core-1-Coursework-Week3#197
SanaAsaf wants to merge 2 commits into
CodeYourFuture:mainfrom
SanaAsaf:main

Conversation

@SanaAsaf

@SanaAsaf SanaAsaf commented Dec 9, 2022

Copy link
Copy Markdown

No description provided.

Was not able to complete all the mandatory will try again

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

Thanks for this @SanaAsaf . I can see you've put a lot of effort into this coursework and I really appreciate it.

This is looking pretty good. I've made a few comments and asked a few questions. Have a look and have a think about it. Thanks again! ⭐


function getTemperatureReport(cities) {
// TODO
let temparatureStatements = [];

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.

Typo here! Typos in variable names often cause bugs so it's really worth picking them up. There is a spellchecker package you can install in VSCode https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker

function getTemperatureReport(cities) {
// TODO
let temparatureStatements = [];
for (let i = 0; i < cities.length; i++){

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.

When you get the solutions for this week, take a look at the example solution. Yours works and is a correct answer; the mentor chose a different strategy. Can you think what the advantages of the mentor's choices are?

@@ -10,7 +10,11 @@ function generateRandomNumber() {
}

function getRandomNumberGreaterThan50() {

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.

This solution works well.

Have you installed Prettier and run it in your VSCode? What does the style guide say about this? https://syllabus.codeyourfuture.io/guides/code-style-guide#using-prettier-to-format-code-automatically

function potentialHeadlines(allArticleTitles) {
// TODO
let checkedArticleTitles=[];
for (let i = 0; i < allArticleTitles.length; i++) {

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.

This works well and is a correct answer.

When you look at the solutions, the mentor used a different kind of loop. Can you think why?

Comment thread 2-mandatory/4-stocks.js
*/
function getAveragePrices(closingPricesForAllStocks) {
// TODO
/* let sum=0;

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.

This code seems to be commented out!

@SallyMcGrath SallyMcGrath added the reviewed A mentor has reviewed this code label Jan 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

reviewed A mentor has reviewed this code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants