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

Conversation

@Jacknguyen4438
Copy link

This is my answer for the home work

Your Details

  • Your Name: Tuan Nguyen
  • Your City: London
  • Your Slack Name: Tuan Nguyen

Homework Details

  • Module: JS core-1
  • Week: week1

Notes

  • What did you find easy?using var key word and function syntax.

  • What did you find hard? How the test work

  • What do you still not understand?how to calculation in function

  • Any other notes?no

@Dedekind561
Copy link
Contributor

Hi there @Jacknguyen4438,
Thank you for your coursework submission. Please can you correctly format the title of this PR - you'll find the instructions in the Git cheatsheet. Check out the section beginning: I want to send my code to volunteers (Pushing)

Copy link
Contributor

@Dedekind561 Dedekind561 left a comment

Choose a reason for hiding this comment

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

Well done on getting your first piece of coursework done!
My main piece of feedback at this point is around variable names - how can you improve the naming of variables in order to convey more meaning in your programs.


function addTaxAndFormatCurrency() {}
function addTaxAndFormatCurrency(product) {
let amountOne=( (product*1.2).toFixed(2)).toString();
Copy link
Contributor

Choose a reason for hiding this comment

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

Hello @Jacknguyen4438 ,
Can you think of a better variable name than amountOne? Think about the calculation you're doing here and what it means in order to help you come up with a clearer variable name. Remember your variable names should convey meaning, as your code will be read by other humans.

function addTaxAndFormatCurrency() {}
function addTaxAndFormatCurrency(product) {
let amountOne=( (product*1.2).toFixed(2)).toString();
// let amountTwo= parseFloat(amountOne);
Copy link
Contributor

Choose a reason for hiding this comment

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

👓 Remember to remove old comments


function calculateSalesTax() {}
function calculateSalesTax(productPrice) {
let productTotal=productPrice+(productPrice*0.2);
Copy link
Contributor

Choose a reason for hiding this comment

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

You have no spaces between the variable names and the expression on the right hand side. Double check the README for instructions on how to format your code

@Jacknguyen4438 Jacknguyen4438 changed the title JS core-1 week-1 homework London 9- Tuan Nguyen-JS-core1-week1 Mar 10, 2023
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.

2 participants