Skip to content

Glasgow - Class 06 - nasir ali - JS3 Challenges#10

Open
ali-nasir-ali wants to merge 2 commits intoCodeYourFuture:masterfrom
ali-nasir-ali:master
Open

Glasgow - Class 06 - nasir ali - JS3 Challenges#10
ali-nasir-ali wants to merge 2 commits intoCodeYourFuture:masterfrom
ali-nasir-ali:master

Conversation

@ali-nasir-ali
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@malkitbenning malkitbenning left a comment

Choose a reason for hiding this comment

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

Great coding Nasir! You have completed more than the mandatory requirement, and you have done it neatly and with clear code that is not wasteful of overly complicated. Very logical thinking applied, and good use of the utilities we have been taught. I expected nothing less!

// 1. Accept arguments

// how will you accept arguments?
const args = process.argv.slice(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.

good way to accept argument!


// how will you make the speech bubble contain the text?
const speechLength = saying.length + 2;
const speechBubble = `${topLine.repeat(speechLength)}
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 like that you used the repeat function here

// 1. Make a command line interface.
const readline = require("readline");

// Create a readline interface
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 use of readline to capture input

@@ -1,49 +1,48 @@
<!DOCTYPE html>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

looks like an auto format has changed every line of the file so it's difficult to compare what was there before and your changes. Possibly switch off the auto-formatting in VS code?

@@ -0,0 +1,92 @@
const oWkey = "88642340ea796944c983a55632f5db1e";
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've hidden my keys by not including them in the upload file - to keep them private.

const { description, images } = await fetchData(city);
updateUI(description, images);
} catch (error) {
console.error("Error fetching data:", error);
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 to see you've trapped errors

cityNameCoordinates("glasgow");
};

async function cityNameCoordinates(city) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

using advanced async await! - good job

thumb.classList.remove("active");
});

e.target.classList.add("active");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

excellent use of target event

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants