Skip to content

[PR Request] HW3 Push01#3

Open
xiivi wants to merge 1 commit into
mainfrom
hw3
Open

[PR Request] HW3 Push01#3
xiivi wants to merge 1 commit into
mainfrom
hw3

Conversation

@xiivi

@xiivi xiivi commented Nov 2, 2022

Copy link
Copy Markdown
Owner

No description provided.

@zfreiter zfreiter self-requested a review November 4, 2022 05:01

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

Looks really well done.
I couldn't find any big errors in the homework.
Everything worked when I tested.
Overall, great job. The style was well done and the code was also well done.

Comment thread hw3/01-routing.js
}

else if (req.url === '/check-cookies') {
let routeResults = getRoutes();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

routeResults is never used in the check-cookies route.
Everything in 01 looks great.
Good job.

Comment thread hw3/02-url.js
let parsedArgs = temp1.split("&");

let results = [];
let temp = [];

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 temp variable is unused. It could be removed.

Comment thread hw3/03-form.js
/>

</head>
<body class="bg-dark">

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 form looks really good.
The style is well done.

Comment thread hw3/03-form.js
res.write(`<ul> ${routeResults} </ul>`);
}

else if (req.url === '/form') {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

else if should be on the same line as the closing } from the previous if statement.
There a couple instances of this.

@ELondonJ ELondonJ left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. I nitpicked a few styling guide requirements.
Good job!

Comment thread hw3/03-form.js
'/submit'
];

let body = "";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Clean readable code. On line 48 single quotes should be used for consistency.

Comment thread hw3/01-routing.js
res.write(`<h2>Error 404 - Page not Found</h2>`);
res.end();
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. For styling, the Airbnb docs require that if else/else statements be on the same line as the previous blocks closing brace
Section 16.1

Comment thread hw3/02-url.js
res.write(table);
}

else if (req.url.indexOf('/characters') >= 0){

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Styling - The Airbnb style guide requires a space before the leading brace.
Section 19.2

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.

3 participants