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

task solution #2686

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Svyatoslav-kolom
Copy link

No description provided.

Copy link

@VitaliyBodnar VitaliyBodnar left a comment

Choose a reason for hiding this comment

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

Almost done!

Comment on lines 25 to 26
const property = parts[0];
const value = parts[1];

Choose a reason for hiding this comment

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

it's better to use arrays destructuring as it will make a code shorter

Suggested change
const property = parts[0];
const value = parts[1];
const [property, value] = parts;

*
* @param {string} sourceString
*
* @return {object}
*/
function convertToObject(sourceString) {
// write your code here
const cssObject = {};
const lines = sourceString.split('\n');

Choose a reason for hiding this comment

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

we can simplify the logic and split by the ;

@Svyatoslav-kolom
Copy link
Author

like that?

Copy link

@nazarmatsevych nazarmatsevych left a comment

Choose a reason for hiding this comment

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

Good work!

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.

5 participants