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
Open
London Class 9 - George Primentas - JavaScript Core 1 - Week 1#414GeorgePrimentas wants to merge 3 commits into
GeorgePrimentas wants to merge 3 commits into
Conversation
Observed use of "var" instead of "let"
| @@ -1,3 +1,5 @@ | |||
| // Start by creating a variable `greeting` | |||
|
|
|||
| let greeting = "Hello world" | |||
There was a problem hiding this comment.
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" | |||
| 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" |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
That's much easier that my solution. Good Job!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Your Details
Homework Details
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