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

Riam Alali-week2hw#110

Closed
RiamAlali wants to merge 17 commits intoHackYourFuture:masterfrom
RiamAlali:master
Closed

Riam Alali-week2hw#110
RiamAlali wants to merge 17 commits intoHackYourFuture:masterfrom
RiamAlali:master

Conversation

@RiamAlali
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Contributor

@marcianoviereck marcianoviereck left a comment

Choose a reason for hiding this comment

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

Overall it looks good! Just some smaller style remarks and could you split your homework up in separate files?


//3
let x ;
console.log ("the value of my variable x will be:EvenNumber");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are you sure that the value of x is EvenNUmber ?
(I don't think it will be that value)

console.log ("the value of my variable x will be:EvenNumber");
console.log (x);
x = 8 ;
console.log ("the value of my variable x will be:EvenNumber");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are you sure that the value of x is EvenNumber?


//4
let y = "HackYourFuture"
console.log ("the value of the string is "+"HackYourFuture")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please don't forget to add ; at the end of the line:)

console.log(a);

let highest;
if (z>a){
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good! You can also use math.max, but this solution is fine:)



//6
let FavoriteAnimals = [ ]; //6.1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You should not use capital letters for the variable names.

So FavoriteAnimals should be favoriteAnimals.

See The naming conventions

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you fix this one?

console.log(FavoriteAnimals); //6.3
let MyFavoriteAnimals = [ 'Deer' , 'Horse' , 'Koala' ]; //6.4
console.log (MyFavoriteAnimals); //6.5
let NewMyFavoriteAnimals = MyFavoriteAnimals.concat(['baby pig']); //6.6
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah nice, you can also use
MyFavoriteAnimals.push('baby pig');

Which might be an easier solution


//8.5
if (typeof(type1)===typeof(type2))
{console.log('type1 and type2 are SameType');}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tip: The code is easier to read if you add more spaces in between the if statement, like this:

if (typeof(type1)===typeof(type3)) {
  console.log('type1 and type3 are SameType');
} else {
  console.log('type1 and type3 are NOT SameType');
}



//9
let X = 7 ;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please use lowercase x

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

And this one, then the homework is approved!

@@ -0,0 +1,121 @@
//1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I see that you did all your homework in one file, but the assignment was to make one file for each part of the homework:

For all the following exercises create a new .js file. Try to find a proper name for each file or make a small comment about what it does inside for future reference.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thank you for your review, I'v made changes as advised, could you please re-check?

@RiamAlali RiamAlali changed the title Add files via upload Riam Alali-week2hw May 10, 2019
@wouterkleijn
Copy link
Copy Markdown
Contributor

Dear @RiamAlali Thanks a lot for addressing Marciano's feedback - very professional indeed! @marcianoviereck Can you check if there is anything left to be done?

@marcianoviereck
Copy link
Copy Markdown
Contributor

@wouterkleijn Yes the homework for week 2 is now approved, but I still need to check the homework for week 3..

Copy link
Copy Markdown
Contributor

@marcianoviereck marcianoviereck left a comment

Choose a reason for hiding this comment

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

Some very minor changes left, over all its good just two small things!



//6
let FavoriteAnimals = [ ]; //6.1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you fix this one?



//9
let X = 7 ;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

And this one, then the homework is approved!

@NoerGitKat NoerGitKat closed this Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants