Skip to content

Conversation

@serhii-baksheiev
Copy link
Contributor

No description provided.

OlegLustenko
OlegLustenko previously approved these changes Jun 18, 2018
for(let i=0;i<arr.length;i++){
let index = arr[i];
if(index===0){
arr.splice(i,1);
Copy link
Member

Choose a reason for hiding this comment

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

решение не будет корректно работать на втором массиве

];
function moveZeroToEnd(arr) {
for(let i=0;i<arr.length;i++){
let index = arr[i];
Copy link
Member

Choose a reason for hiding this comment

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

я бы сказал, что это не индекс, а это 'element'

openBraces(elem);
}
}
return `${newArr}`;
Copy link
Member

Choose a reason for hiding this comment

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

Я видел похожее решение и это решение было неверным.

Тебе нужно возвращать не строку тут

@OlegLustenko OlegLustenko merged commit 64d7900 into master Jun 20, 2018
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