-
Notifications
You must be signed in to change notification settings - Fork 0
Develop #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
nnnkit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:-)
| if (typeof x == "number" && typeof y == "number") { | ||
| return x * y; | ||
| } else { | ||
| alert("not a nuumber"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be more specific in the message like Both numbers are not of number data type
|
|
||
| //my code Function Declaration | ||
|
|
||
| function multiplyTwoNumber(x = 0, y = 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should take the initial value as 1 when multiplying the numbers.
|
|
||
| //my code Function Declaration | ||
|
|
||
| function divideSecondNumber( x = 0, y = 0 ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The initial value should be 1 not 0 for division.
|
|
||
| //my code Function Declaration | ||
|
|
||
| function performTrueFalse( a, b) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also write it like this
function performTrueFalse( a, b) {
return a < b;
}
| ```js | ||
| // your code goes here | ||
|
|
||
| (age > 18) && return true || (age >= 18) && confirm("Did parents allow you?") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should not return when using && ||.
No description provided.