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

London 9 Turing -Farnoosh Moayeri-JS-Week-1 - #458

Open
Farnooshmo wants to merge 12 commits into
CodeYourFuture:masterfrom
Farnooshmo:master
Open

London 9 Turing -Farnoosh Moayeri-JS-Week-1#458
Farnooshmo wants to merge 12 commits into
CodeYourFuture:masterfrom
Farnooshmo:master

Conversation

@Farnooshmo

@Farnooshmo Farnooshmo commented Nov 25, 2022

Copy link
Copy Markdown

Volunteers: Are you marking this coursework? You can find a guide on how to mark this coursework in HOW_TO_MARK.md in the root of this repository

Your Details

  • Your Name: Farnoosh Moayeri
  • Your City: London
  • Your Slack Name: Farnoosh Moayeri

Homework Details

  • Module: JS
  • Week: 1

Notes

  • What did you find easy? Using let, const.

  • What did you find hard? Find good names for variables.

  • What do you still not understand?-

  • Any other notes? No


View rendered exercises/D-strings/README.md
View rendered exercises/E-strings-concatenation/README.md

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

Great job! If you'd like to push on further, try running the tests in the mandatory folder 👏

Comment thread exercises/F-strings-methods/exercise2.js Outdated
function createGreeting(name) {
return greet + name;
}
var greet = "Hello, my name is ";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It's better that this variable declaration moves inside the createGreeting function.
Also const is preferable to var in this case as a variable declared with const can't be overwritten.

}

function greetingMentors(names) {
return `HELLO ${namesUpperCase(names)}`;

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 a string template!

Comment thread mandatory/1-syntax-errors.js Outdated
}
function getTotal(a, b) {
total = a ++ b;
total = a + b;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It's better to use const in front of the variable name, so it's not global, and can't be redeclared.

Comment thread mandatory/4-tax.js

function calculateSalesTax() {}
function calculateSalesTax(priceOfProduct) {
const salesTax = 0.2 * priceOfProduct;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Great, well done

Comment thread mandatory/4-tax.js Outdated

function addTaxAndFormatCurrency() {}
function addTaxAndFormatCurrency(priceOfProduct) {
return "£".concat(calculateSalesTax(priceOfProduct).toFixed(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.

There's a lot happening in this line, maybe separate it into 2 lines so it's easier to read. eg first line - call calculateSalesTax
second line - make the formatted string (you could use a string template?)

@Farnooshmo

Copy link
Copy Markdown
Author

@jonnywyatt Hi, thank you very much for reviewing my codes. I will correct them.
I run the test for mandatory and all of the exercises marked as green on my terminal but I can't see the green tick here.

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

You did good👏

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants