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

Manchester-NW5-Esam-Ahmed- Javascript-week2 - #409

Open
esamahmed27 wants to merge 2 commits into
CodeYourFuture:masterfrom
esamaalesaei:master
Open

Manchester-NW5-Esam-Ahmed- Javascript-week2#409
esamahmed27 wants to merge 2 commits into
CodeYourFuture:masterfrom
esamaalesaei:master

Conversation

@esamahmed27

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: Esam
  • Your City: Manchester
  • Your Slack Name: North West

Homework Details

  • Module: 2
  • Week: 2

Notes

  • What did you find easy?

  • What did you find hard?

  • What do you still not understand?

  • Any other notes?

var greeting = "Hello world";
console.log(greeting);
console.log(greeting);
console.log(greeting);

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 variable.

console.log(message);
var names = " Esam ";
var nameLength = names.trim();
console.log(nameLength);

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 .trim. You also need to use .length to get the number of letters in the name.

// const nameLength = names.length;

console.log(message);
console.log(nameLength);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

As with the previous exercise, you need to use .length to get the number of letters in the name

var numberOfStudents = 45;
var numberOfMentors = 10;
var TotalOfAll = numberOfMentors + numberOfStudents;
console.log(TotalOfAll);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your code is correctly adding 2 numbers and outputting the result. If you read the question and expected output, you will see that you should be using different numbers and outputting more details. Also, variable names in Javascript are normally in lower camel case, i.e. totalOfAll

var studentPercent = "Percentage Students:" + Math.round((numberOfStudents / total) * 100 ) + "%";
var mentorPercent = "Percentage Mentors:" + Math.round((numberOfMentors / total) * 100) + "%";
console.log(studentPercent);
console.log(mentorPercent);

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 Math library

@@ -1,5 +1,7 @@
// Declare your function here

function createLongGreeting (name, age){

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 meaningful variable names

var mentorName = uppercaseName(mentor);
var message = "Hello " + mentorName;
console.log(message);
}

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 have clearly understood how to call one function from another, and again, you have used goo variable names.

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

Your code works well and you have clearly understood all the concepts covered. You need to ensure that you read the questions and expected output for each exercise - there are a couple of exercises where your code works but you have not answered the exact question asked. But otherwise this is very good.

@luan-murilo-de-oliveira-e-souza

Copy link
Copy Markdown

Good work Esam, Your code is very clear, just a suggestion rename your pull request to Manchester-NW5-Esam-Ahmed- Javascript-week1 instead of Manchester-NW5-Esam-Ahmed- Javascript-week2

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