Skip to content

Conversation

uryadov1998
Copy link

Copy link
Collaborator

@KostyaKov KostyaKov left a comment

Choose a reason for hiding this comment

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

I'll mark the PR as "Draft", please click "ready for review" when it will be finished. Thank you!

*/
function concatenateStrings(value1, value2) {
throw new Error('Not implemented');
return value1+value2;
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is necessary to observe indents between operators

*/
function extractNameFromTemplate(value) {
throw new Error('Not implemented');
return value.substring(7,value.length-1);
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is necessary to observe indents between operators

*/
function getCardId(value) {
throw new Error('Not implemented');
let cards = ['A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K'];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Need to use "const"

*/
function getRectangleArea(width, height) {
throw new Error('Not implemented');
return width*height;
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is necessary to observe indents between operators

*/
function getCicleCircumference(radius) {
throw new Error('Not implemented');
return radius*2*Math.PI;
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is necessary to observe indents between operators

*/
function removeFalsyValues(arr) {
throw new Error('Not implemented');
return arr.filter(elem => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here you can use simple option "filter(Boolean)"

*/
function getUpperCaseStrings(arr) {
throw new Error('Not implemented');
let array = arr.map(elem => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can use return without variable.
Example: "arr.map(n => n.toUpperCase())"

*/
function toCsvText(arr) {
throw new Error('Not implemented');
let array = arr.map(elem => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here you can use just "join('\n')"

function findAllOccurences(arr, item) {
throw new Error('Not implemented');
let numberOfRepeatedChars = 0;
arr.filter(elem => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can solve this using "filter" and "length" without counter

function getFalsyValuesCount(arr) {
throw new Error('Not implemented');
let numberOfFalses = 0;
arr.filter(elem => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can solve this using "filter" and "length" without counter

@KostyaKov KostyaKov marked this pull request as draft August 31, 2020 10:01
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.

2 participants