Skip to content

Fatemah AlAttar#10

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

Fatemah AlAttar#10
EngFAlAttar wants to merge 1 commit intoJoinCODED:mainfrom
EngFAlAttar:main

Conversation

@EngFAlAttar
Copy link

Completed task 2

*/
function isOdd(n: number): boolean {
// Your code here
return n % 2 != 0;

Choose a reason for hiding this comment

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

Watch out for !=. We should use !==

// Your code here

return -1; // replace -1 with what you see is fit
if (n % 2 == 0) return n * 2;

Choose a reason for hiding this comment

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

Here we should use ===

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