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

London Class 8 - Irina Shilova - JavaScript - Core 1 - Week 1 - #258

Closed
IrinShilova wants to merge 3 commits into
CodeYourFuture:masterfrom
IrinShilova:master
Closed

London Class 8 - Irina Shilova - JavaScript - Core 1 - Week 1 #258
IrinShilova wants to merge 3 commits into
CodeYourFuture:masterfrom
IrinShilova:master

Conversation

@IrinShilova

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? First exercises

  • What did you find hard? Some functions

  • What do you still not understand? The last task in "extra"

  • Any other notes?


let message = "My name is " + name + " and my name is 6 characters long."
console.log(message);
var nameTrim = 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.

Great work just one thing, it may be better to use let or const instead of var here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Great work just one thing, it may be better to use let or const instead of var here.

Yes, I agree. Thank you, Hamra

Comment thread mandatory/1-syntax-errors.js Outdated
return "Hello, my name is " + name "and I am " age + "years old";

function introduceMe(name, age) {
return "Hello, my name is " + name + " and I am " + age + "years old";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like you have a minor bug here, just missing a space before "years old". Also, this may be a nice place to try out string interpolation - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals

return word.length();
}

function multiply(a, b, c) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Did you get a chance to look at this multiply function? It looks like you will still need to return a value here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, now I fixed the errors

Comment thread mandatory/4-tax.js
function calculateSalesTax() {}
function calculateSalesTax(num) {
let tax = (num * 20) / 100;
return tax + num;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

Comment thread mandatory/4-tax.js

function addTaxAndFormatCurrency() {}
function addTaxAndFormatCurrency(num) {
return "£" + calculateSalesTax(num).toFixed(2);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Really well done on this tax exercise!

function convertToBRL() {}
function convertToBRL(price) {
let newPrice = ((price * 99) / 100) * 5.7;
let brazilPrice = newPrice.toFixed(2);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like the tests are failing here because this function is not returning a value. Any idea how you might fix this?

Comment thread extra/2-piping.js
// Why can this code be seen as bad practice? Comment your answer.
let badCode =
// too many functions, difficult to understand;
format (multiply(add(startingValue, 10), 2));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like the test is failing because we're not assigning a value to the variable badCode. Can you think of how to fix this?

@moneyinthesky

Copy link
Copy Markdown
Contributor

Hey @IrinShilova, overall this is a good effort - well done! It looks like you had some failing tests in your exercises. Were you able to get the tests running in your local environment? If you need help with that, please let me know!

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