-
Notifications
You must be signed in to change notification settings - Fork 255
add homework for week1 js #205
Conversation
marcianoviereck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The homework is looking good! I do have quite some feedback and suggestions. Can you take a look at them and fix them?:)
| @@ -0,0 +1,7 @@ | ||
| var myString="hello"+ " "+ "world"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it's better to use var or let here?
Also, don't forget to add some spacing between your variable and the value. So like this:
var myString = "hello" + " " + "world";
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, I have made some changes yesterday, but it is in commits section. whould you plz take a look?
| console.log('greetings'); | ||
| console.log(myString); | ||
|
|
||
| var myString="love you"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will give a already defined error, because you have already defined myString a couple lines above.
Could you look at this again?
| @@ -0,0 +1,25 @@ | ||
| let z=7.25; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here again, good that you use let! But don't forget to add some spacing :)
let z = 7.25;
| console.log(a); | ||
|
|
||
|
|
||
| let highestValue=(Math.max(a,z)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow very nice!
Do you think it's better to use let or const here?:)
|
|
||
|
|
||
|
|
||
| // let a=7; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can remove these, right? Because it's commented out
| // console.log(numbers.length); | ||
|
|
||
| let compare = 'names.length === numbers.length'; | ||
| compare=false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you made a mistake here, can you take a look at this and see if you can fix it.
| @@ -0,0 +1,8 @@ | ||
| 'use strict' | ||
| var mySentence ="Programming is so interesting!"; | ||
| var length=mySentence.length; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question here, is it better to use var or let?
| @@ -0,0 +1,26 @@ | ||
| 'use strict' | ||
| var a = 'Hello'+ " " +'world!';//english |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the var a here and just directly log the value. Like this:
console.log('Hello'+ " " +'world!');
And also for all the others:)
| 'use strict'; | ||
| let numberX; | ||
| console.log('number'); | ||
| console.log(12); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the value here 12? Are you sure:)?
|
|
||
| var fruit='apple'; | ||
| var fruit='pear'; | ||
| var car = { type: "Fiat", model: "500", color: "white" }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you didn't finish this assignment, can you take a look at it again?
|
|
||
| // or | ||
| console.log('I\'m awesome'); | ||
| console.log('I`m awesome'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This last one is not really correct, because the output would not be the same. the ` is a different character then the '. You already solved the exercise with the first two answers!
marcianoviereck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice fixes! The homework is approved:)! I ignored the week 2 files because you added it by accident.
thank you