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

JavaScript-Core-1-Coursework-Week1- north-west-class4-abed - #132

Closed
Abed-Aghbar wants to merge 1 commit into
CodeYourFuture:masterfrom
Abed-Aghbar:master
Closed

JavaScript-Core-1-Coursework-Week1- north-west-class4-abed#132
Abed-Aghbar wants to merge 1 commit into
CodeYourFuture:masterfrom
Abed-Aghbar:master

Conversation

@Abed-Aghbar

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?

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

good work

return "Hello " + name;
}

function createCreeting(name1, name2, name3, name4, name5) {

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, i think is better to use for loop

@@ -1,3 +1,6 @@
const name = " Daniel ";
var name = "Abed ";

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.

Great work, nice to see you experimenting with string methods too :)

@@ -1 +1,6 @@
// Start by creating a variables `numberOfStudents` and `numberOfMentors`
var numberOfStudents = 15 ;

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.

Be consistent with your semi-colons, Although they are not always required, I would suggest that you always use them until you learn more about the nuances of JavaScript's automatic semicolon insertion. Also, no need for spaces before semi-colons. Otherwise good work.

var PercentageMentors = numberOfMentors / sum;


console.log("Percentage students: " + Math.round(PercentageStudents*100) + "%")

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.

It would be better to evaluate the percentages and then pass the final values to console.log, rather that rounding the floats inside console.log, but otherwise good work.

}
// Call the function
var greeting = nameAge("Daniel", 30);
console.log(greeting); No newline at end of file

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.

Again, be mindful of consistent formatting, otherwise, great work.

}

var greeting = createCreeting(mentor1, mentor2, mentor3, mentor4, mentor5);
console.log(greeting); No newline at end of file

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.

Check your logging to the console. I get "Hello Yohannes" printed to the console, have a look at your return statement from the function createGreeting()


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

@mike-shields-cyf mike-shields-cyf Jul 1, 2021

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.

be mindful of leading and trailing whitespace when concatenating strings, curly braces are also missing here.

}

function concatenate(firstWord, secondWord, thirdWord) {
return concat(firstWord, secondWord, thirdWord)

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.

concat needs to be called as a method on a string. Also be aware of any neccesary whitespace. Please request access to the solutions repo and check your answer.

Comment thread mandatory/4-tax.js

function addTaxAndFormatCurrency() {}
function addTaxAndFormatCurrency(new_price) {
return concat ("£" + float(new_price * 1.20))

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.

There's some issues, here. Please request access to the solutions repo and check your answer. If there is something you don't understand, please let me know.

@github-actions

Copy link
Copy Markdown

Your coursework submission has been closed because nobody has interacted with it in six weeks. You are welcome to re-open it to get more feedback.

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