Skip to content

Task Done - Abdulrahman Alshatti and Zainab AlHallaqTask#7

Open
AbdulrahmanAlshatti wants to merge 1 commit intoJoinCODED:mainfrom
AbdulrahmanAlshatti:main
Open

Task Done - Abdulrahman Alshatti and Zainab AlHallaqTask#7
AbdulrahmanAlshatti wants to merge 1 commit intoJoinCODED:mainfrom
AbdulrahmanAlshatti:main

Conversation

@AbdulrahmanAlshatti
Copy link

No description provided.

const half = n/2;
const answer = Math.floor(half);
return answer;
return -1; // replace -1 with what you see is fit

Choose a reason for hiding this comment

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

Since we return before this line, the second return is a line that will never be reached. We can delete it.


if(isOdd(n)) return n * n;
else return n * 2
return -1; // replace -1 with what you see is fit

Choose a reason for hiding this comment

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

This line will never be reached. Delete it

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