London class 8-Mohammad Alamin - JS - week 1 - #259
Conversation
First commit of week 1 assignment
|
@haack All mandetory tests I passed in my Vs code but I don't know why its showing 1 test is not passing, And I was unable to run any test for all files in extra folder, Tried upgrading the jest version and all but no luck. |
| @@ -2,7 +2,7 @@ | |||
|
|
|||
There was a problem hiding this comment.
Well done for completing the Java Script Week 1.
| @@ -1,3 +1,5 @@ | |||
| // Start by creating a variable `message` | |||
| let message = 'Its cold outside!' | |||
There was a problem hiding this comment.
You have a spelling mistake here, instead of Its use It's please.When iI rush I do the same mistake :)
| @@ -1,3 +1,5 @@ | |||
| // Start by creating a variable `message` | |||
| let message = 'Its cold outside!' | |||
| let messegeType = typeof message | |||
| // Start by creating a variable `message` | ||
| let message = 'Its cold outside!' | ||
| let messegeType = typeof message | ||
| console.log(`${message}. It's a ${messegeType} type message`); |
There was a problem hiding this comment.
Very good understanding of interpolation since in this stage.
| let myName = 'Mohammad ' | ||
| let nameLength = myName.length | ||
| let trimName = myName.trim() | ||
| let message = 'My name is '+trimName+' '+'and my name is '+nameLength+' characters long' |
There was a problem hiding this comment.
To simplify your code instead of using a new string to create space you van use a space inside of the quotation marks.
| @@ -1,5 +1,10 @@ | |||
| // Declare your function first | |||
| let divide = function(a, b){ | |||
There was a problem hiding this comment.
Very good understanding of declaring and assigning but in this case you can simplify your code just by declaring the function strait away function divde(){
}
| @@ -5,8 +5,11 @@ | |||
| Write a function that converts a price to USD (exchange rate is 1.4 $ to £) | |||
There was a problem hiding this comment.
Well done on completing the extra exercises 👍
|
|
||
|
|
||
| function concatenate(firstWord, secondWord, thirdWord) { | ||
| return `${firstWord} ${secondWord} ${thirdWord}` |
There was a problem hiding this comment.
Very good understanding of interpolation but in this exercise we are being asked to use the concat() method. Remember concat() doesn't add spaces between strings in this case we have to use the " " to add space.
| "jest-extended": "^0.11.5" | ||
| "jest-extended": "^1.2.0" | ||
| } | ||
| } |
Volunteers: Are you marking this coursework? You can find a guide on how to mark this coursework in
HOW_TO_MARK.mdin the root of this repositoryYour Details
Homework Details
Notes
What did you find easy? Exercises and mandatory files
What did you find hard? figuring out the jest errors that exist in many files
What do you still not understand? Jest
Any other notes? Overall straight forward Java script exercises but many errors exits in original repo
View rendered README.md