Skip to content

#6 task aleksey prusevich#910

Draft
AlekseyPrusevich wants to merge 6 commits into
ilya4321:masterfrom
AlekseyPrusevich:#6-Task-Aleksey-Prusevich
Draft

#6 task aleksey prusevich#910
AlekseyPrusevich wants to merge 6 commits into
ilya4321:masterfrom
AlekseyPrusevich:#6-Task-Aleksey-Prusevich

Conversation

@AlekseyPrusevich

Copy link
Copy Markdown

@vramaniuk vramaniuk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'll mark the PR as "Draft", please click "ready for review" when it will be finished. Thank you!

*/
function isTriangle(a,b,c) {
throw new Error('Not implemented');
return ((a < b+c) && (b < a+c) && (c < a+b)) ? true : false

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please, spaces between operators
Please, try to follow these rules https://javascript.info/coding-style

we can just return ((a < b + c) && (b < a + c) && (c < a + b))
Please, see https://javascript.info/logical-operators

*/
function isInsideCircle(circle, point) {
throw new Error('Not implemented');
return ((point.x - circle.center.x) ** 2 + (point.y - circle.center.y) ** 2 <= (circle.radius - 0.00001) ** 2);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why should we use additional value (0.00001) ?
((point.x - circle.center.x) ** 2 + (point.y - circle.center.y) ** 2 < (circle.radius) ** 2) works

Comment on lines +206 to +210
if (searchChar == newStr[j])
{
break INNER_LOOP;
}
if (j + 1 == newStr.length)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"operator === is always preferable
sometimes ''==' may cause an error
(check at console :
'0' == 0
and '0' === 0)"

evenChar = !evenChar;
}

return (sum % 10) == 0;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

operator === is always preferable


for (let i = 0; i < arr1.length; i++)
{
if (arr1[i] == arr2[i])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

operator === is always preferable


for (let i = 0; i < arr1.length; i++)
{
if ((arr1[i] == arr2[i]) && (arr2[i] == arr3[i]))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

operator === is always preferable

@vramaniuk
vramaniuk marked this pull request as draft August 24, 2020 13:48
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