This repository was archived by the owner on Oct 26, 2020. It is now read-only.
First pull request - #22
Open
Osman-Hajr wants to merge 10 commits into
Open
Conversation
Commiting changes for the homework, exercise and some of the extras.
Commiting my answers to the exercises
comitting answers to exercises
Update 1-fix-functions.js
EmilePW
self-requested a review
July 13, 2020 19:13
EmilePW
approved these changes
Jul 13, 2020
EmilePW
left a comment
There was a problem hiding this comment.
Hi @Osman-Hajr, this is really great work, I think you have a good understanding of the material here. The only note I had was for your calculateSalesTax function below:
Careful not to have redundant code, e.g. for calculating sales tax you have used the priceUnit parameter twice and multiplied it by 1 which is unnecessary:
function calculateSalesTax(priceUnit) {
let taxedPrice = priceUnit + (priceUnit * 1) / 5;
return taxedPrice;
}
Instead, you could write it like:
function calculateSalesTax(priceUnit) {
let taxedPrice = priceUnit * (1 + 1 / 5);
return taxedPrice;
}
Which will do the same thing with less repetition.
Like I said, this is great work overall!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commiting changes for the homework, exercise and some of the extras.
Your Details
Your Name: Osman
Your City: Birmingham
Your Slack Name: Osman Hajr
Homework Details
Module: JavaScript-Core-1.
Week: 1.