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

north-west-5/shimen-afshar/javascript-week1 - #392

Open
ShimenAfshar wants to merge 5 commits into
CodeYourFuture:masterfrom
ShimenAfshar:master
Open

north-west-5/shimen-afshar/javascript-week1#392
ShimenAfshar wants to merge 5 commits into
CodeYourFuture:masterfrom
ShimenAfshar:master

Conversation

@ShimenAfshar

@ShimenAfshar ShimenAfshar commented Aug 26, 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:
  • Your City:
  • Your Slack Name:

Homework Details

  • Module:
  • Week:

Notes

  • What did you find easy?

  • What did you find hard?

  • What do you still not understand?

  • Any other notes?


View rendered exercises/B-hello-world/README.md

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

this looks really good, the only thing I would suggest is not to use var as it is outdated javascript. I agree it's hard to remember when some of the exercises are using it, but the code your future guidelines just ask to not use it.

@Doris-Siu Doris-Siu 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.

Hi Shimen, very good job in using camelCase in naming your variables, and the code you wrote is very precise and concise:)
Please aware that we don't use var to declare variables anymore (use const/let instead) and some minor typos (as it might confuse other programmers.)

@@ -1,3 +1,5 @@
// Start by creating a variable `greeting`

var greeting = "Helo World"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Typo -> "Hello"

const name = " Daniel ";

console.log(message);
const convertetName = name.trim();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Are you trying to mean "convertedName" in the variable name? I am not sure.

Comment thread mandatory/4-tax.js

function calculateSalesTax() {}

const TAX_RATE = 0.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.

Is there any special meaning to capitalize this variable particularly?
If no, I would suggest follow the camelcase guideline in naming.

const name = " Daniel ";

console.log(message);
const convertetName = name.trim();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi, you can also do console.log(message. trim()).

Comment thread mandatory/4-tax.js
const TAX_RATE = 0.2;

function calculateSalesTax(price) {
let tax = price * TAX_RATE;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

HI, for the variable TAX_RATE we can use camelcase like - taxRate. or you can avoid declaring the variable as well for that the code should be - function calculateSalesTax(price) {
let salestax = (price * 0.2)
return price + salestax;
}

well done. Keep it up

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants