Skip to content

completed all tasks#10

Open
SeanSilke wants to merge 1 commit intohexlet-exercises:masterfrom
SeanSilke:master
Open

completed all tasks#10
SeanSilke wants to merge 1 commit intohexlet-exercises:masterfrom
SeanSilke:master

Conversation

@SeanSilke
Copy link
Copy Markdown

No description provided.

Comment thread solutions/seansilke.js
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Из ридми:

Ограничения

Язык JavaScript
Нельзя использовать сторонние библиотеки
Допускается только посимвольный перебор строки

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Такой подход пойдет:
var charArr = strRep.split("") - получаю мaссив символов
charArr.reduce(fun, 0) - редьюсю в число
?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Попробуем еще разок: "Допускается только посимвольный перебор строки".

Вы ведь понимаете что я не спроста такое условие поставил? ;)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Ясно )
Буду использовать String.prototype.slice(1)
Условие хорошее, по накатанной дорожке не получилось пойти.
Скорее не понимаю, чем понимаю.

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