Skip to content

Conversation

@gidra5
Copy link

No description provided.

Copy link
Member

@tshemsedinovtshemsedinov left a comment

Choose a reason for hiding this comment

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

Add {} everywhere

// For example sum(1, 2, 3) should return 6
letacc=0;
for(leti=0;i<args.length;++i)
acc+=args[i];
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
acc+=args[i];
acc+=args[i];
}

// to calculate sum of all given arguments
// For example sum(1, 2, 3) should return 6
letacc=0;
for(leti=0;i<args.length;++i)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for(leti=0;i<args.length;++i)
for(leti=0;i<args.length;++i){

// to calculate sum of all given arguments
// For example sum(1, 2, 3) should return 6
letacc=0;
for(constnumofargs)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for(constnumofargs)
for(constnumofargs){

letacc=0;
for(constnumofargs)
acc+=num;

Copy link
Member

Choose a reason for hiding this comment

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

}

// to calculate sum of all given arguments
// For example sum(1, 2, 3) should return 6
letaccum=0;
while(args.length!==0)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
while(args.length!==0)
while(args.length!==0){

letaccum=0;
while(args.length!==0)
accum+=args.pop();

Copy link
Member

Choose a reason for hiding this comment

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

}


for(letrow=0;row<matrix.length;++row)
for(letcolumn=0;column<matrix[row].length;++column)
maxVal=(matrix[row][column]>maxVal) ? matrix[row][column] : maxVal;
Copy link
Member

Choose a reason for hiding this comment

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

Use code blocks {}

Sign up for freeto 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

@gidra5@tshemsedinov