Skip to content

Develop#131

Open
coroboX wants to merge 5 commits into
mate-academy:masterfrom
coroboX:develop
Open

Develop#131
coroboX wants to merge 5 commits into
mate-academy:masterfrom
coroboX:develop

Conversation

@coroboX

@coroboX coroboX commented May 24, 2020

Copy link
Copy Markdown

No description provided.

Comment thread src/rleCompress.js Outdated
*/
function rleCompress(source) {
// write code here
let readOff = '';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
let readOff = '';
let compressedString = '';

Comment thread src/rleCompress.js Outdated
Comment on lines +26 to +28
if (source.length < 2) {
return source;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

я думаю можно и без этой проверки справиться, она точно нужна?

Comment thread src/rleCompress.js
}

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

в первой итерации ты сравниваешь первый элемент с первым элементом, это не нужно

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