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

London Class 9 - George Primentas - JavaScript Core 1 - Week 1 - #414

Open
GeorgePrimentas wants to merge 3 commits into
CodeYourFuture:masterfrom
GeorgePrimentas:master
Open

London Class 9 - George Primentas - JavaScript Core 1 - Week 1#414
GeorgePrimentas wants to merge 3 commits into
CodeYourFuture:masterfrom
GeorgePrimentas:master

Conversation

@GeorgePrimentas

Copy link
Copy Markdown

Your Details

  • Your Name: George Primentas
  • Your City: London
  • Your Slack Name: George Primentas

Homework Details

  • Module: JavaScript Core 1
  • Week: 1

Notes

  • What did you find easy?

  • What did you find hard?
    No issues really

  • What do you still not understand?
    Why while we have been instructed to use let over var (as the latter becomes obsolete) there is no single mention/use of let in these exercises.

  • Any other notes?
    No

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

Well done George! You did a great job.

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

let greeting = "Hello 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.

Try to add ';' at the end of each line.

@@ -1,3 +1,4 @@
// Start by creating a variable `message`

let message = "This is a string"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Also, here. ';' missing.

console.log("Number of students: " + numberOfStudents);
console.log("Number of mentors: " + numberOfMentors);
console.log("Total number of students and mentors: " + (numberOfStudents + numberOfMentors));
// If there are no parentheses circling numberOfStudents + numbersOfMentors then concatination takes place and instead of "68" (56+12) we get "5612"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It's very good. I would suggest to create another variable to store the sum:

let sum=numberOfStudent+numberOfMentors;
console.log("Total number of students and mentors: " + sum);

function concatenate(firstWord, secondWord, thirdWord) {
// Write the body of this function to concatenate three words together.
// Look at the test case below to understand what this function is expected to return.
return firstWord.concat(" ", secondWord, " ", thirdWord);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

That's much easier that my solution. Good Job!

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.

3 participants