Skip to content

Commit

Permalink
fix: string concatenation
Browse files Browse the repository at this point in the history
  • Loading branch information
VsevolodEpinetov committed Oct 16, 2024
1 parent 80c70e1 commit 02ee886
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const getRandomDescription = () => {
Object.keys(DUMMY_DESCRIPTIONS).forEach((partName) => {
const getRandomHashtag = () => getRandomArrayElement(DUMMY_DESCRIPTIONS[partName]);

let randomPart = '', amountOfHashtags;
let randomPart, amountOfHashtags;
switch (partName) {
case 'hashtags':
amountOfHashtags = getRandomPositiveIntFromRange(3, 9);
Expand All @@ -116,7 +116,8 @@ const getRandomDescription = () => {
break;
}

description += randomPart + ' ';
description += randomPart;
description += ' ';
});

description = description[0].toUpperCase() + description.slice(1);
Expand Down

0 comments on commit 02ee886

Please sign in to comment.