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

Conversation

Jacknguyen4438
Copy link

Your Details

  • Your Name: Tuan
  • Your City: London 9
  • Your Slack Name: Tuan Nguyen

Homework Details

  • Module: JS-core 1
  • Week: 2

Notes

  • What did you find easy? Understand of to use compare and logical operator

  • What did you find hard? Doing with while loop

  • What do you still not understand? No answer

  • Any other notes? No answer

@Jacknguyen4438 Jacknguyen4438 changed the title JS-core-1-week2-coursework London 9 -Tuan Nguyen-JS-core1-week2 Mar 10, 2023

function greaterThan10(num) {
let isBigEnough;
let isBigEnough=num;
Copy link

Choose a reason for hiding this comment

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

Looks good but I'm wondering whether you can make it better? You did similar changes already in the getMood function. Would that work here too?

Comment on lines +83 to +88
function countReverse(number) {
while (number >0){
console.log(number);
};
number=number-1;
};
Copy link

Choose a reason for hiding this comment

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

Good effort but are you sure this is correct? When you ran this code locally did it work for you correctly?
Look closely what you are trying to do with number parameter. Current code will result in never ending loop and will never complete is there a better way?

Hint: Have a look at your printOddNumbers function.

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.

2 participants