Skip to content

Alex J - JS Fundamentals#31

Open
Alex90Jennings wants to merge 16 commits intoboolean-uk:mainfrom
Alex90Jennings:main
Open

Alex J - JS Fundamentals#31
Alex90Jennings wants to merge 16 commits intoboolean-uk:mainfrom
Alex90Jennings:main

Conversation

@Alex90Jennings
Copy link

No description provided.


// TODO: write code in this function body to pass the tests

if(num >= lower && num <= upper){
Copy link
Contributor

Choose a reason for hiding this comment

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

return ( num >= lower && num <= upper )
is equivalent

case 1:
case 2:
case 3:
case 4:
Copy link
Contributor

Choose a reason for hiding this comment

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

switch is possibly not best option here.
Could use if ( isInRange( age, 1, 4 ) ) Text = "Baby";
with else ifs etc


// TODO: write code in this function body to pass the tests

lowestNum = Math.min(...nums);
Copy link
Contributor

Choose a reason for hiding this comment

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

Idea here is to use your own implementation.

Have a look at Carlo and Shahzad's versions - which may be the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants