Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution #2756

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Solution #2756

wants to merge 1 commit into from

Conversation

YuriySobakar
Copy link

No description provided.

Comment on lines +21 to +26
noEmptyRows.forEach(row => {
const trimmedString = row.split(':');
const [ key, value ] = trimmedString;

styles[key.trim()] = value.trim();
});

Choose a reason for hiding this comment

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

Nice work! But you can try to create code without using f

Copy link

@ArtemTeslenko ArtemTeslenko left a comment

Choose a reason for hiding this comment

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

Good job!

// write your code here
const styles = {};
const unformatRows = sourceString.split(';');
const noEmptyRows = unformatRows.filter(row => row.trim() !== '');

Choose a reason for hiding this comment

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

it will work without !==''

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