Skip to content

Conversation

@KenriqueM
Copy link
Owner

No description provided.

@KenriqueM KenriqueM requested a review from nnnkit August 16, 2019 06:46
Copy link
Collaborator

@nnnkit nnnkit left a 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");
Copy link
Collaborator

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) {
Copy link
Collaborator

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 ) {
Copy link
Collaborator

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) {
Copy link
Collaborator

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?")
Copy link
Collaborator

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 && ||.

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.

3 participants